O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Mutex

Synopsis

A Mutex is an implementation of a WaitHandle. ReleaseMutex() releases a lock on a WaitHandle. A thread that owns a Mutex lock can call any of the Wait() methods (defined in the parent class, WaitHandle) without blocking, but must then release the Mutex the same number of times as the Mutex was obtained.

public sealed class Mutex : WaitHandle {
// Public Constructors
   public method Mutex();  
   public method Mutex(bool initiallyOwned);  
   public method Mutex(bool initiallyOwned, string name);  
   public method Mutex(bool initiallyOwned, string name, 
        out bool createdNew);  
// Public Instance Methods
   public method void ReleaseMutex();  
}

Hierarchy

System.ObjectSystem.MarshalByRefObjectWaitHandle(System.IDisposable)Mutex

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required