There are not that many full-fledged lock-free queues for C++. Boost has one, but it's limited to objects with trivial assignment operators and trivial destructors, for example. Intel's TBB queue isn't lock-free, and requires trivial constructors too. There're many academic papers that implement lock-free queues in C++, but usable source code is hard to find, and tests even more so. This queue not only has less limitations than others (for the most part), but it's also faster. It's been fairly well-tested, and offers advanced features like bulk enqueueing/dequeueing (which, with my new design, is much faster than one element at a time, approaching and even surpassing the speed of a non-concurrent queue even under heavy contention). In short, there was a lock-free queue shaped hole in the C++ open-source universe, and I set out to fill it with the fastest, most complete, and well-tested design and implementation I could.

Features

  • An industrial-strength lock-free queue for C++
  • Single-header implementation, just drop it in your project
  • Fully thread-safe lock-free queue
  • Use concurrently from any number of threads
  • Elements are moved (instead of copied) where possible
  • No artificial limitations on element types or maximum count
  • Memory can be allocated once up-front, or dynamically as needed
  • Fully portable (no assembly; all is done through standard C++11 primitives)
  • Supports super-fast bulk operations
  • Includes a low-overhead blocking version (BlockingConcurrentQueue)

Project Samples

Project Activity

See All Activity >

Categories

Site Management

License

BSD License

Follow moodycamel::ConcurrentQueue

moodycamel::ConcurrentQueue Web Site

Other Useful Business Software
The AI workplace management platform Icon
The AI workplace management platform

Plan smart spaces, connect teams, manage assets, and get insights with the leading AI-powered operating system for the built world.

By combining AI workflows, predictive intelligence, and automated insights, OfficeSpace gives leaders a complete view of how their spaces are used and how people work. Facilities, IT, HR, and Real Estate teams use OfficeSpace to optimize space utilization, enhance employee experience, and reduce portfolio costs with precision.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of moodycamel::ConcurrentQueue!

Additional Project Details

Operating Systems

Windows

Programming Language

C++

Related Categories

C++ Site Management Software

Registered

2021-09-24