C#’s lock statement provides built-in language support for synchronizing multi-thread access to blocks of code. Under the hood, lock is syntactical sugar simplifying the use of .Net’s Monitor exclusive lock. Let’s examine three ways Monitor can be used: via lock, directly and via a method attribute. Continue reading
Monitor in Three Flavors – C# Thread Synchronization
•