title: std::unique_lock<std::mutex> or std::lock_guard<std::mutex>?
body: <p>I have two use cases.</p>
  <p>A. I want to synchronise access to a queue for two threads.</p>
  <p>B. I want to synchronise access to a queue for two threads and use a condition variable because one of the threads will wait on content to be stored into the queue by the other thread.</p>
  <p>For use case A I see code example using <a href="http://en.cppreference.com/w/cpp/thread/lock_guard" rel="noreferrer"><code>std::lock_guard&lt;&gt;</code></a>. For use case B I see code example using <a href="http://en.cppreference.com/w/cpp/thread/unique_lock" rel="noreferrer"><code>std::unique_lock&lt;&gt;</code></a>.</p>
  <p>What is the difference between the two and which one should I use in which use case?</p>