Module spsc

Module spsc 

Source
Expand description

Single-producer single-consumer bounded queue.

Two implementations are available:

  • index (default): Cached head/tail indices on separate cache lines
  • slot: Per-slot lap counters

Both are exposed as submodules for benchmarking. The top-level re-exports use the implementation selected by feature flag.

# Use slot-based implementation
nexus-queue = { version = "...", features = ["slot-based"] }

Structs§

Consumer
The consumer endpoint of an SPSC queue.
Producer
The producer endpoint of an SPSC queue.

Functions§

ring_buffer
Creates a bounded SPSC ring buffer with the given capacity.