title: pthread conditional variable
body: <p>I'm implementing a thread with a queue of tasks. As soon as as the first task is added to the queue the thread starts running it.</p>
  
  <p>Should I use pthread condition variable to wake up the thread or there is more appropriate mechanism?</p>
  
  <p>If I call <code>pthread_cond_signal()</code> when the other thread is not blocked by <code>pthread_cond_wait()</code> but rather doing something, what happens? Will the signal be lost?</p>