concept mutex in category c#
appears as: mutex

This is an excerpt from Manning's book Code like a Pro in C#.
Locking resources and controlling thread access is the bane of many software engineers’ existence. Code blows up in complexity once you deal with multiple threads because the amount of places errors can crop up increases rapidly. To lessen the burden of developers, C# exposes one statement (
lock) and two primary types of synchronization primitives to save you: mutexes and semaphores.
decimal netWorth = 1000000; lock(netWorth) { … }