title: How does pthread_cond_broadcast works?
body: <p>Say the broadcasting thread broadcasts while only 3 threads are waiting and the 4th thread call <code>pthread_cond_wait</code> after the broadcasting thread is done with broadcast, will the 4th thread ever get out of the waiting condition. And how is the condition variable reset, so that the broadcasting thread can rebroadcast sometimes later to the waiting threads.</p>