Effects: Transfers ownership of the lock associated with
lk into
internal storage and schedules
cond to be notified when the current
thread exits
. This notification is sequenced after
all objects with thread storage duration associated with
the current thread have been destroyed and
is equivalent to:
cond.notify_all();
lk.unlock();