SPSCQueue is a bounded single-producer, single-consumer queue written in C++11 for high-performance inter-thread communication. It is both lock-free and wait-free within its intended one-producer and one-consumer model. The queue provides blocking and nonblocking insertion methods along with direct access to the element at the front. Items can be inserted through copy, move, or in-place construction. Benchmarks published by the project show lower latency and higher throughput than several comparable queue implementations on the tested hardware. Its fixed-size structure avoids repeated allocation during normal queue operations. The header-only design makes it useful for real-time, low-latency, and producer-consumer applications where predictable synchronization overhead matters.

Features

  • Single-producer single-consumer design
  • Lock-free and wait-free operation
  • Fixed-capacity queue storage
  • Blocking and nonblocking insertion
  • In-place element construction
  • Header-only C++11 implementation

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow SPSCQueue.h

SPSCQueue.h Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SPSCQueue.h!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

C++

Related Categories

C++ Libraries

Registered

2026-09-24