A Single-Producer-Single-Consumer queue backed by a pre-allocated buffer.
This implementation is a mashup of the
Fast Flow algorithm with an optimization of the offer method taken from the
BQueue algorithm (a variation on Fast Flow).
For convenience the relevant papers are available in the resources folder:
2010 - Pisa - SPSC Queues on Shared Cache Multi-Core Systems.pdf
2012 - Junchang- BQueue- Efficient and Practical Queuing.pdf
This implementation is wait free.