What is the purpose of AutoResetEvent in .NET?AutoResetEvent
is a synchronization class provided by .NET. It belongs to System.Threading
namespace.
Like ManualResetEvent, AutoResetEvent establishes thread communication based on signaling. If the status of a particular AutoResetEvent is signaled, then the thread can begin its execution. If its status is nonsignaled then the thread has to wait until the status is set back to signaled. Signaling is done using the following means: You
can call Set method to set status of its instance to signaled Note that
unlike ManualResetEvent, the reset of status from signaled to nonsignaled
happens automatically in AutoResetEvent.
|