EventWaitHandle Constructor (Boolean, EventResetMode)

EventWaitHandle Constructor (Boolean, EventResetMode)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the EventWaitHandle class, specifying whether the wait handle is initially signaled, and whether it resets automatically or manually.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

public EventWaitHandle(
	bool initialState,
	EventResetMode mode
)

Parameters

initialState
Type: System.Boolean
true to set the initial state to signaled; false to set it to nonsignaled.
mode
Type: System.Threading.EventResetMode
One of the EventResetMode values that determines whether the event resets automatically or manually.

If the initial state of the event is nonsignaled, threads that wait on the event will block. If the initial state is signaled, and the ManualReset flag is specified for mode, threads that wait on the event will not block. If the initial state is signaled, and mode is AutoReset, the first thread that waits on the event will be released immediately, after which the event will reset, and subsequent threads will block.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft