Sat Dec 10 15:28:21 EST 2011

Condition Variables are not Semaphores

A condition_signal() will only unblock a condition_wait(), but it will
not cause semaphore-like behavior where condition_wait() will not
block if there is a condition waiting.

A condition variable is really just a queue of threads that are
waiting to be woken up.

( Observed in some obscure thread-priority bug where one thread was
not allowed to start up to the point it was actually waiting on a
condition variable, so it missed a signal causing a deadlock. )

[1] http://en.wikipedia.org/wiki/Monitor_(synchronization)#Blocking_condition_variables