Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
There are three exclusive locking constructs: the lock statement, Mutex and SpinLock. The lock construct is the most convenient and widely
used, whereas the other two target niche scenarios:
Mutex lets you span multiple
processes (computer-wide locks).
SpinLock implements a
micro-optimization that can lessen context switches in
high-concurrency scenarios (see http://albahari.com/threading/).