Trheading :
AutoResetEvent allows threads to communicate with each other by signaling. Typically, this communication concerns a resource to which threads need exclusive access.
A thread waits for a signal by calling
WaitOne on the
AutoResetEvent. If the
AutoResetEvent is in the non-signaled state, the thread blocks, waiting for the thread that currently controls the resource to signal that the resource is available by calling
Set.