title: boost::condition_variable and lock
body: <pre><code>boost::condition_variable cond;
  boost::mutex mut;
  
  //thread1
  {
  "read_socket()"
  cond.notify_one();
  }
  
  //thread2
  {
  for(;;)
  {
  ...
  boost::unique_lock&lt;boost::mutex&gt; lock(mut);
  cond.wait(lock);
  }
  }
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>boost::condition_variable cond;
  boost::mutex mut;
  
  //thread1
  {
  "read_socket()"
  boost::unique_lock&lt;boost::mutex&gt; lock(mut);
  cond.notify_one();
  }
  
  //thread2
  {
  for(;;)
  {
  ...
  boost::unique_lock&lt;boost::mutex&gt; lock(mut);
  cond.wait(lock);
  }
  </code></pre>
  
  <p>Is there an impact if I omit the lock before calling cond.notify_one() ?</p>