[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Notifies one or more waiting threads that an event has occurred. This class cannot be inherited.
Assembly: mscorlib (in mscorlib.dll)
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|Reset||Sets the state of the event to nonsignaled, which causes threads to block.|
|Set||Sets the state of the event to signaled, which allows one or more waiting threads to proceed.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|WaitOne()()()()||Blocks the current thread until the current WaitHandle receives a signal. (Inherited from WaitHandle.)|
|WaitOne(Int32, Boolean)||Blocks the current thread until the current WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval and specifying whether to exit the synchronization domain before the wait. (Inherited from WaitHandle.)|
Unlike the class, the class provides access to named system synchronization events.
allows threads to communicate with each other by signaling. Typically, this communication concerns a task which one thread must complete before other threads can proceed.
When a thread begins an activity that must complete before other threads proceed, it calls to put ManualResetEvent in the non-signaled state. This thread can be thought of as controlling the ManualResetEvent. Threads that call WaitOne on the ManualResetEvent will block, awaiting the signal. When the controlling thread completes the activity, it calls to signal that the waiting threads can proceed. All waiting threads are released.
Once it has been signaled, ManualResetEvent remains signaled until it is manually reset. That is, calls to WaitOne return immediately.
You can control the initial state of a ManualResetEvent by passing a Boolean value to the constructor, true if the initial state is signaled and false otherwise.