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

◆ wait_one() [3/3]

virtual bool xtd::threading::wait_handle::wait_one ( const time_span timeout)
virtual

Blocks the current thread until the current instance receives a signal, using a xtd::time_span to measure the time interval.

Parameters
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 if the current instance receives a signal. If the current instance is never signaled, xtd::threading::wait_handle.wait_one(int32, bool) never returns.
Exceptions
xtd::object_closed_exceptionthe handle is invalid
xtd::threading::abandoned_mutex_exceptionThe wait completed because a thread exited without releasing a mutex.
xtd::argument_exceptionmilliseconds_timeout is a negative number other than -1, which represents an infinite time-out.