title: Why does a condition variable need a lock (and therefore also a mutex)
body: <p>Condition variables are one of the aspects of c++11 I'm still struggling with a bit. From what I have gathered a condition variable is very similar to a semaphore. </p>
  
  <p>But then again, a semaphore wouldn't need a lock to function. A condition variable does. And a lock in turn needs a mutex. So in order to use the fairly simple functionality of a semaphore we now need to not only manage a condition variable. But also a mutex and a lock.</p>
  
  <p>So why does a condition variable need this? And what added functionality is provided by adding this requirement?</p>