title: Blocking concurrent queue with lock-free algorithms
body: <p>I'm building a blocking concurrent queues (i.e., consumers sleep if nothing in queue until waked up by producers). My use case is restricted in that the dequeue operation will <em>always</em> block on an empty queue; there is no <code>tryDequeue</code>.</p>
  
  <p>My current implementation simply uses a <code>std::mutex</code> with a <code>std::condition_variable</code>. I'd like to know if it makes sense to improve the data structure with lock-free algorithms. In the case where the queue is empty, that probably doesn't make sense since the consumers have to block anyway. But in the case where the queue is non-empty, could there be anything I can do?</p>