title: Conditional variable is stuck on waiting
body: <p>Why the condition variable is stuck on waiting if it was notified in <code>worker_thread</code>? What am I missing here?</p>
  
  <pre><code>#include &lt;thread&gt;
  #include &lt;mutex&gt;
  #include &lt;condition_variable&gt;
  #include &lt;iostream&gt;
  
  std::mutex m;
  std::condition_variable cv;
  
  void worker_thread()
  {
      cv.notify_one();
  }
  
  int main()
  {
      std::thread worker(worker_thread);
  
      std::cout &lt;&lt; "Start waiting..." &lt;&lt; std::endl;
      std::unique_lock&lt;std::mutex&gt; lk(m);
      cv.wait(lk);
      std::cout &lt;&lt; "Finished waiting..." &lt;&lt; std::endl;
  
      worker.join();
  
      getchar();
  }
  </code></pre>