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

◆ signal_and_wait() [3/3]

static bool xtd::threading::wait_handle::signal_and_wait ( wait_handle to_signal,
wait_handle to_wait,
const time_span timeout 
)
static

Signals one xtd::threading::wait_handle and waits on another, specifying a time-out interval as a time_span.

Parameters
to_signalThe wait_handle to signal.
to_waitThe wait_handle to wait on.
timeoutA time_span that represents the interval to wait. If the value 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.