Qus:    When the lock key is used?
Dec 18, 2020 15:42 DotNet 2 Answers Views: 1240 FRAUSKY

 Lock keyword ensures that one thread is executing a piece of code at one time. The lock keyword is used to ensure that one thread does not enter a critical section of code while another thread is in that critical section.



 



  The lock material ensures that the text does not include the key portion of a thread code, another thread is in the critical section. When any other text attempts to enter a locked code, it will prevent and block until the material is published

Prev Next
Answers (2)
PARTH Dec 19, 2020 11:41
Answer:   Lock keyword ensures that one thread is executing a piece of code at one time. The lock keyword is used to ensure that one thread does not enter a critical section of code while another thread is in that critical section.

SHIVA Dec 19, 2020 14:32
Answer:   The lock material ensures that the text does not include the key portion of a thread code, another thread is in the critical section. When any other text attempts to enter a locked code, it will prevent and block until the material is published.

Post Your Answer
Guest User

Not sure what solution is right for you?

Choose the right one for you.
Get the help of the experts and find a solution that best suits your needs.


Let`s Connect