title: How do I use a boost condition variable to wait for a thread to complete processing?
body: <p>I am using a conditional variable to stop a thread until another thread has completed processing it's task queue (long story). So, on one thread I lock and wait:</p>
  
  <pre><code>boost::mutex::scoped_lock lock(m_mutex);
  m_condition.wait(lock);
  </code></pre>
  
  <p>Once the other thread has completed it's tasks, it signals the waiting thread as follows:</p>
  
  <pre><code>boost::mutex::scoped_lock lock(m_parent.m_mutex);
  m_parent.m_condition.notify_one();
  </code></pre>
  
  <p>The problem I am seeing is that the waiting thread does not stop waiting unless I set a breakpoint on the instructions following it (I am using xcode, fyi). Yes, this seems strange. Does anyone know why this might be happening? Am I mis-using the condition variable?</p>