xtd 0.2.0
Loading...
Searching...
No Matches

◆ event_wait_handle() [6/8]

xtd::threading::event_wait_handle::event_wait_handle ( bool  initial_state,
event_reset_mode  mode 
)

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

Parameters
initial_statetrue to set the initial state to signaled; false to set it to nonsignaled.
modeOne of the xtd::threading::event_reset_mode values that determines whether the event resets automatically or manually.
Remarks
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 xtd::threading::event_reset_mode::manual_reset flag is specified for mode, threads that wait on the event will not block. If the initial state is signaled, and mode is xtd::threading::event_reset_mode::auto_reset, the first thread that waits on the event will be released immediately, after which the event will reset, and subsequent threads will block.
Exceptions
xtd::argument_excpetionThe mode enum value was out of legal range.