[
Note 1:
That is, all
threads have been notified; they can subsequently block on the lock specified in the
wait
. This relaxes the usual rules, which would have required all wait calls to happen before
destruction
. Only the notification to unblock the wait needs to happen before destruction
. Undefined behavior ensues if a thread waits on
*this once the destructor has
been started, especially when the waiting threads are calling the wait functions in a loop or
using the overloads of
wait,
wait_for, or
wait_until that take a predicate
. —
end note]