EventWaitHandle, AutoResetEvent, CountdownEvent, ManualResetEvent
Event wait handles allow threads to synchronize activities by signaling each other and by waiting on each other's signals. These synchronization events are based on Win32 wait handles and can be divided into two types: those that reset automatically when signaled and those that are reset manually.
Event wait handles are useful in many of the same synchronization scenarios as the Monitor class. Event wait handles are often easier to use than the Monitor.Wait and Monitor.Pulse methods, and they offer more control over signaling. Named event wait handles can also be used to synchronize activities across application domains and processes, whereas monitors are local to an application domain.
In This Section
ManualResetEvent and ManualResetEventSlim
The ManualResetEvent class derives from EventWaitHandle and represents a local event that must be reset manually. The ManualResetEventSlim class is a lightweight, faster version that can be used for events within the same process.
The WaitHandle class is the base class for the EventWaitHandle, Semaphore, and Mutex classes. It contains static methods such as SignalAndWait and WaitAll that are useful when working with all types of wait handles.