Microsoft Dot Net Master

Microsoft Dot Net Master
Microsoft Dot Net Master

Sunday, May 1, 2011

What is ManualResetEvent and AutoResetEvent ?


Threads that call one of the wait methods of a synchronization event must wait until another thread signals the event by calling the Set method. There are two synchronization event classes. Threads set the status of ManualResetEvent instances to signaled using the Set method. Threads set the status of ManualResetEvent instances to no signaled using the Reset method or when control returns to a waiting WaitOne call. Instances of
the AutoResetEvent class can also be set to signaled using Set, but they automatically return to nonsignaled as soon as a waiting thread is notified that the event became signaled.

No comments:

Post a Comment