MPMCQueue is a bounded multi-producer, multi-consumer concurrent queue implemented as a C++11 header. It is designed for situations where several threads need to enqueue and dequeue items from the same fixed-capacity structure. The implementation focuses on high-throughput concurrent access while avoiding conventional queue locking patterns. It has been used in production systems including game engines and low-latency trading infrastructure. Testing combines single-threaded correctness checks with multithreaded fuzz testing under heavy contention. The queue correctly manages object construction and destruction while coordinating concurrent producers and consumers. Its small header-only design makes it straightforward to embed in performance-sensitive C++ projects.
Features
- Bounded multi-producer multi-consumer queue
- C++11 header-only implementation
- Concurrent enqueue and dequeue operations
- Fixed-capacity memory model
- Single-threaded and multithreaded testing
- Production use in low-latency systems