Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. concurrentqueue

concurrentqueue

NOASSERTIONC++v1.0.5

A fast, industrial-strength, lock-free concurrent queue for C++11 supporting multi-producer and multi-consumer patterns.

GitHubGitHub
12.2k stars1.9k forks0 contributors

What is concurrentqueue?

moodycamel::ConcurrentQueue is a lock-free concurrent queue implementation for C++11, designed for high-performance multi-threaded applications. It allows multiple producers and consumers to enqueue and dequeue items simultaneously without locks, reducing contention and improving throughput. The queue includes features like bulk operations, memory management, and a blocking variant for synchronization.

Target Audience

C++ developers building high-performance, concurrent applications such as game engines, real-time systems, or parallel data processing pipelines. It is ideal for those needing efficient thread-safe data structures without the overhead of locks.

Value Proposition

Developers choose this queue for its exceptional speed, comprehensive feature set, and robustness compared to alternatives like Boost or Intel TBB. Its single-header design, lock-free algorithm, and support for bulk operations make it both easy to integrate and highly efficient under heavy contention.

Overview

A fast multi-producer, multi-consumer lock-free concurrent queue for C++11

Use Cases

Best For

  • High-throughput multi-threaded data processing
  • Real-time systems requiring low-latency message passing
  • Game engines managing concurrent task queues
  • Parallel algorithms needing thread-safe data structures
  • Server applications handling concurrent requests
  • Simulations with heavy producer-consumer patterns

Not Ideal For

  • Applications requiring strict linearizable ordering between coordinated producers
  • NUMA-based systems where memory locality is critical for scaling
  • Projects needing simple, out-of-the-box memory preallocation without complex calculations
  • Environments with short-lived threads where implicit producer recycling is unsupported

Pros & Cons

Pros

Blazing Fast Performance

Benchmarks show it often outperforms alternatives like Boost and Intel TBB queues, especially with bulk operations, due to optimized lock-free design.

Single-Header Integration

Just drop concurrentqueue.h into your project, making it easy to adopt without build system complications, as highlighted in the README.

Efficient Bulk Operations

Supports high-speed enqueueing and dequeueing of multiple elements at once, reducing overhead and approaching non-concurrent queue speeds under contention.

Comprehensive Thread Safety

Fully lock-free and usable from any number of threads without artificial limits on element types or counts, managing memory automatically.

Cons

Non-Linearizable Ordering

Elements from coordinated producers may not deque in the expected order, a limitation the README explicitly warns about, requiring workarounds like shared tokens.

Complex Preallocation Requirements

Using try_enqueue requires arcane formulas to size memory correctly, with the README admitting it's non-obvious and error-prone under contention.

Limited Sequential Consistency

Lacks strong memory ordering guarantees, making correct usage difficult without deep understanding of happens-before relationships, as noted in samples.

Frequently Asked Questions

Quick Stats

Stars12,226
Forks1,915
Contributors0
Open Issues67
Last commit21 days ago
CreatedSince 2014

Tags

#parallel-computing#c-plus-plus-11#high-performance#queue#multi-threading#data-structures#c-plus-plus#lock-free#concurrency

Built With

C
C++11

Included in

C/C++70.6k
Auto-fetched 1 day ago

Related Projects

TaskflowTaskflow

A General-purpose Task-parallel Programming System in C++

Stars11,937
Forks1,394
Last commit2 days ago
ThreadPoolThreadPool

A simple C++11 Thread Pool implementation

Stars8,731
Forks2,352
Last commit1 year ago
ArrayFireArrayFire

ArrayFire: a general purpose GPU library.

Stars4,882
Forks548
Last commit1 month ago
NCCLNCCL

Optimized primitives for collective multi-GPU communication

Stars4,641
Forks1,214
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub