nexus_queue/spsc/
mod.rs

1//! Single-producer single-consumer bounded queue.
2//!
3//! Two implementations are available:
4//!
5//! - **index** (default): Cached head/tail indices on separate cache lines
6//! - **slot**: Per-slot lap counters
7//!
8//! Both are exposed as submodules for benchmarking. The top-level re-exports
9//! use the implementation selected by feature flag.
10//!
11//! ```toml
12//! # Use slot-based implementation
13//! nexus-queue = { version = "...", features = ["slot-based"] }
14//! ```
15
16#[cfg(not(feature = "spsc-slot"))]
17mod index;
18
19#[cfg(not(feature = "spsc-slot"))]
20pub use index::{ring_buffer, Producer, Consumer};
21
22#[cfg(feature = "spsc-slot")]
23mod slot;
24
25#[cfg(feature = "spsc-slot")]
26pub use slot::{ring_buffer, Producer, Consumer};