A fast multi-producer, multi-consumer lock-free concurrent queue for C++11
Maybe someone can educate me.  I've studied them for a while, but I don't get the fascination with lock- or wait-free queues.If you actually care about real-time guarantees enough to look into lock-free solutions, you already ought to have non-preemptive workers (i.e. cooperative multitasking).  This then allows you to have only one queue per CPU (since exclusive access is guaranteed), simplifying the problem.With one queue per CPU, multi-producer becomes trivial (atomic doorbell + round robin), and multi-consumer is easy (CAS to acquire a work item).  You don't have fairness guarantees for consumers, but who cares, only when they are not saturated can they not be fair and then that's a good thing.Application stalls don't happen (one non-preemptible queue per CPU), application crashes are managed at a higher level, and IRQs can be disabled for the 5 cycles you spend in the critical sections.I assume I'm missing something, since I'm somewhat new at this, and lock-freedom is clearly in vogue, but I don't know what it is.