About 74 results
Open links in new tab
  1. c# - What does a lock statement do under the hood? - Stack Overflow

    The lock statement is translated to calls to the Enter and Exit methods of Monitor. The lock statement will wait indefinitely for the locking object to be released.

  2. Thread Synchronization with Advanced Lock in C#

    Learn Thread Synchronization with Advanced Lock in C# with Examples. Learn how to manage threads effectively in your applications.

  3. C# lock statement, what object to lock on? - Stack Overflow

    1: the object you use defines / is-defined-by the lock granularity you are trying to enforce. If is is "anything calling against the current instance", then a private readonly object syncLock = new …

  4. multithreading - C# manual lock/unlock - Stack Overflow

    Feb 12, 2015 · C# manual lock/unlock Asked 14 years, 11 months ago Modified 2 years, 9 months ago Viewed 49k times

  5. c# - Lock in properties, good approach? - Stack Overflow

    Apr 28, 2016 · Lock in properties, good approach? Asked 16 years, 5 months ago Modified 9 years, 11 months ago Viewed 15k times

  6. Monitor And Lock In C# - C# Corner

    Monitor and lock is the way to provide thread safety in a multithreaded application in C#. Both provide a mechanism to ensure that only one thread is executing code at the same time to avoid any functional …

  7. c# - How expensive is the lock statement? - Stack Overflow

    34 Further reading: I would like to present few articles of mine, that are interested in general synchronization primitives and they are digging into Monitor, C# lock statement behavior, properties, …

  8. c# - Why is lock (this) {...} bad? - Stack Overflow

    Oct 31, 2008 · This is false. The object passed as a parameter to lock merely serves as a key. If a lock is already being held on that key, the lock cannot be made; otherwise, the lock is allowed. This is …

  9. Thread Locking In C# - C# Corner

    Exclusive locking in C# threading ensures that one thread does not enter a critical section while another thread is in the critical section of code.

  10. Interlocked vs Lock in C# with Examples - Dot Net Tutorials

    Interlocked vs Lock in C# with Examples: In this article, I am going to discuss Interlocked vs Lock in C# with Examples. Please read our previous article, where we discussed Atomic Methods, Thread …