xtd 0.2.0
Loading...
Searching...
No Matches
xtd::native::unnamed_event_wait_handle Class Referencefinal

Definition

Contains unnamed_event_wait_handle native API.

Namespace
xtd::native
Library
xtd.core.native
Remarks
xtd::threading::semaphore does not use xtd::native::unnamed_event_wait_handle API as it uses std::counting_semaphore class.
Warning
Internal use only

Protected Static Methods

static intmax_t create (bool initial_state, bool manual_reset)
 Create named event wait handle with specified initial state and manual reset.
 
static void destroy (intmax_t handle)
 Destroy named event wait handle with specified event wait handle handle.
 
static bool set (intmax_t handle, bool &io_error)
 Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
 
static bool reset (intmax_t handle, bool &io_error)
 Sets the state of the event to nonsignaled, causing threads to block.
 
static uint32_t wait (intmax_t handle, int32_t milliseconds_timeout, bool manual_reset)
 Wait named event wait handle with specified event wait handle handle, timeout and manual reset.
 

Member Function Documentation

◆ create()

static intmax_t xtd::native::unnamed_event_wait_handle::create ( bool  initial_state,
bool  manual_reset 
)
staticprotected

Create named event wait handle with specified initial state and manual reset.

Parameters
initial_statetrue to set the initial state to signaled if the named event is created as a result of this call; false to set it to nonsignaled.
manual_resettrue the event resets manually; false the event resets automatically.
nameThe name, if the synchronization object is to be shared with other processes.
Returns
The handle of the created event wait handle.
Warning
Internal use only

◆ destroy()

static void xtd::native::unnamed_event_wait_handle::destroy ( intmax_t  handle)
staticprotected

Destroy named event wait handle with specified event wait handle handle.

Parameters
handleThe event wait handle handle to destroy.
Warning
Internal use only

◆ set()

static bool xtd::native::unnamed_event_wait_handle::set ( intmax_t  handle,
bool &  io_error 
)
staticprotected

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.

Parameters
handleThe event wait handle handle to set.
Returns
true if succeed; otherwhise false.
Warning
Internal use only

◆ reset()

static bool xtd::native::unnamed_event_wait_handle::reset ( intmax_t  handle,
bool &  io_error 
)
staticprotected

Sets the state of the event to nonsignaled, causing threads to block.

Parameters
handleThe event wait handle handle to reset.
Returns
true if succeed; otherwhise false.
Warning
Internal use only

◆ wait()

static uint32_t xtd::native::unnamed_event_wait_handle::wait ( intmax_t  handle,
int32_t  milliseconds_timeout,
bool  manual_reset 
)
staticprotected

Wait named event wait handle with specified event wait handle handle, timeout and manual reset.

Parameters
handleThe event wait handle handle to wait.
milliseconds_timeoutThe timeout in milliseconds (-1 is infinite timeout).
manual_resettrue the event resets manually; false the event resets automatically.
Returns
error code :
  • 0x00000000 : Sucess
  • 0x00000080 : Abandoned
  • 0x00000102 : Timeout
  • 0xFFFFFFFF : Failed
Warning
Internal use only

The documentation for this class was generated from the following file: