System.Threading.WaitHandle Class

Encapsulates operating system–specific objects that wait for exclusive access to shared resources.

See Also: WaitHandle Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public abstract class WaitHandle : MarshalByRefObject, IDisposable

Remarks

This class is typically used as a base class for synchronization objects. Classes derived from WaitHandle define a signaling mechanism to indicate taking or releasing access to a shared resource, but use the inherited WaitHandle methods to block while waiting for access to shared resources.

Use the static methods of this class to block a thread until one or more synchronization objects receive a signal.

System.Threading.WaitHandle implements the IDisposable.Dispose pattern. See Implementing Finalize and Dispose to Clean Up Unmanaged Resources. When you derive from System.Threading.WaitHandle, use the WaitHandle.SafeWaitHandle property to store your native handle operating system handle. You do not need to override the protected WaitHandle.Dispose(bool) method unless you use additional unmanaged resources.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0