共用方式為


AutoResetEvent 

The AutoResetEvent class represents a local wait handle event that resets automatically when signaled, after releasing a single waiting thread. This class represents a special case of its base class, EventWaitHandle. See the EventWaitHandle conceptual documentation for the use and features of automatic reset events.

An AutoResetEvent object is automatically reset to non-signaled by the system after a single waiting thread has been released. If no threads are waiting, the event object's state remains signaled. AutoResetEvent corresponds to a Win32 CreateEvent call, specifying false for the bManualReset argument.

For an example that uses AutoResetEvent, see Monitor.

See Also

Reference

ManualResetEvent
Monitor

Concepts

Wait Handles

Other Resources

EventWaitHandle, AutoResetEvent, and ManualResetEvent
Managed Threading
Threading Objects and Features