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

◆ join_all() [3/6]

static bool xtd::threading::thread::join_all ( const time_span timeout)
static

Blocks the calling thread until all joinable threads terminate or the specified time elapses, while continuing.

Parameters
timeoutA xtd::time_span set to the amount of time to wait for all threads to terminate.
Returns
true if all threads have terminated; false if all threads have not terminated after the amount of time specified by the timeout parameter has elapsed.
Exceptions
xtd::threading::thread_state_exceptionThe caller attempted to join a thread that is in the xtd::threading::thread_state::unstarted state.
Remarks
If one or more threads are not joinable, they will be skipped.
Call xtd::threading::thread_pool::close method to join the end of running worker threads too.