Help for this page
m-locking m-waiting t-Locking ... t-Waiting m-locking m-waiting # and again, we both wait...
If there are no threads blocked in a "cond_wait" on the variable, the signal is discarded. By always locking before signaling, you can (with care), avoid signaling before another thread has entered cond_wait().