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

◆ signal_and_wait() [2/3]

static bool xtd::threading::wait_handle::signal_and_wait ( wait_handle to_signal,
wait_handle to_wait,
int32  milliseconds_timeout 
)
static

Signals one xtd::threading::wait_handle and waits on another, specifying a time-out interval as a 32-bit signed integer.

Parameters
to_signalThe xtd::threading::wait_handle to signal.
to_waitThe xtd::threading::wait_handle to wait on.
milliseconds_timeoutAn integer that represents the interval to wait. If the value is xtd::threading::timeout::infinite, that is, -1, the wait is infinite
Returns
bool true if both the signal and the wait complete successfully; if the wait does not complete, the method does not return.
Exceptions
xtd::object_closed_exceptionthe to_signal and/or to_wait are invalid
xtd::invalid_operation_exceptionto_signal is a semaphore, and it already has a full count.
xtd::threading::abandoned_mutex_exceptionThe wait completed because a thread exited without releasing a mutex.