void wait(std::unique_lock<std::mutex>& lock);
true, and the lock
is owned by the calling thread.
Atomically unlock the supplied
object and block until the the thread is woken by a call to
by another thread, or the thread is woken spuriously. The
lock object is locked again before
the call to
The spurious wake ups mean that a thread calling
may wake even though no thread has called
It is therefore recommended that the overload
that takes a predicate is used in preference where possible.
Otherwise, it is recommended that
be called in a loop which tests the predicate associated with the
on a single
are serialized. A call to
will only wake threads that started waiting prior
to that call.