https://msdn.microsoft.com/en-us/library/system.threading.mutex(v=vs.110).aspx
- a primitive .NET type
- one thread owns it at a time
WaitOne(int)
- blocks the calling thread
- returns true when no threads own it
- then gives ownership to the calling thread
- otherwise, returns false when the timeout expires
- similar to the
Semaphore
.NET type- but only the owner of a
Mutex
can release aMutex
, - and
Mutex
scope can pass application domain boundaries
- but only the owner of a
- scope
- a local, unnamed
Mutex
has process scope - a system, named
Mutex
has operating system scope
- a local, unnamed
- use case examples: