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

◆ wait_all() [3/3]

template<typename collection_t >
static bool xtd::threading::wait_handle::wait_all ( const collection_t &  wait_handles,
const time_span timeout 
)
inlinestatic

Waits for all the elements in the specified collection to receive a signal, using a xtd::time_span value to measure the time interval.

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.
timeoutA xtd::time_span that represents the number of milliseconds to wait, or a xtd::time_span that represents -1 milliseconds, to wait indefinitely.
Returns
true when every element in wait_handles has received a signal; otherwise the method never returns.
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.