# cameron314/readerwriterqueue

A fast single-producer, single-consumer lock-free queue for C++

Repository: https://github.com/cameron314/readerwriterqueue
Canonical: https://ross.abutalabs.com/products/readerwriterqueue
Language: C++
License: NOASSERTION
License Family: other
Last push: 2026-08-23T21:03:34+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 4955, "days_push": 10, "days_rel": 492, "gap_med": null, "n_releases_24m": 1}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4615, forks 735 (observed 2026-08-28T04:08:55.122299+00:00)

## What it is
A fast, wait-free single-producer single-consumer (SPSC) lock-free queue for C++11, implemented as a header-only library. It supports move semantics, dynamic growth, and a blocking variant with timed waits.

## Use cases
- pass data between two threads without locks
- fast SPSC queue for C++
- lock-free producer-consumer communication
- queue that never allocates on enqueue
- high-performance inter-thread message passing
- replace std::queue in a two-thread pipeline

## When to choose
- you have exactly one producer thread and one consumer thread
- you need wait-free O(1) enqueue/dequeue with minimal latency
- you want a header-only dependency with no build system required
- you need a blocking queue with timed waits

## When to avoid
- you need multiple producers or multiple consumers
- threads need to switch producer/consumer roles
- you need cross-platform atomics on compilers older than C++11
- you need a general-purpose MPMC queue (use the author's moodycamel::ConcurrentQueue instead)

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, caching
- domain: developer-tools, performance
- platform: cpp, cross-platform
- tags: lock-free, spsc-queue, header-only, wait-free, single-producer-single-consumer, thread-safe, algorithms

## Member repositories
- cameron314/readerwriterqueue (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:55.122299+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:19:40.736165+00:00, confidence not recorded.
  - readme: https://github.com/cameron314/readerwriterqueue (fetched 2026-08-28T04:08:55.122299+00:00, sha b70c0387e1e3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
