cond_wait
cond_wait var
- Takes the locked variable var, unlocks it, and blocks until another thread does a
cond_signalorcond_broadcastfor that variable. The variable is relocked after thecond_waithas been satisfied. If multiple threads arecond_waiting, all but one will reblock waiting to reacquire the lock.