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

◆ wait_any() [1/3]

template<typename collection_t >
static size_t xtd::threading::wait_handle::wait_any ( const collection_t &  wait_handles)
inlinestatic

Waits for any of the elements in the specified collection to receive a signal.

Parameters
wait_handlesA xtd::threading::wait_handle collection containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object.
Returns
The array index of the object that satisfied the wait.
Exceptions
xtd::argument_exceptiontimeout is a negative number other than -1 milliseconds, which represents an infinite time-out.
-or-
The number of objects in wait_handles is greater than the system permits.
xtd::object_closed_exceptionthe to_signal and/or to_wait are invalid
xtd::argument_exceptionThe number of objects in wait_handles is greater than the system permits.
xtd::threading::abandoned_mutex_exceptionThe wait completed because a thread exited without releasing a mutex.