What is the purpose of ManualResetEvent in .NET?.NET supports
two synchronization classes namely ManualResetEvent and AutoResetEvent.
ManualResetEvent belongs to System.Threading namespace. This class establishes
communication within threads. This communication is achieved by signaling.
Each instance of this class will have a status which can either be signaled or nonsignaled. This status field indicates whether the thread can continue with execution or not. If it is in signaled state, then the thread can begin its execution. If its status is set to nonsignaled, then the thread is blocked. It has to wait until it receives the indication through which its status goes back to signaled. Signaling is done using the following means: You
can call Set method to set status of its instance to signaled.
|