Skip to main content

Module spsc

Module spsc 

Source
Expand description

Cacheline-padded, lock-free SPSC ring for cross-thread signaling (TH-02).

Used for the control-plane → worker command path and worker → control result path. One producer, one consumer; try_push/try_pop only, so neither side ever blocks. Zero SeqCst; the handoff edge is the standard acquire/release message-passing pair.

Loom model-checking: tests/loom_spsc.rs.

Structs§

SpscReceiver
Consumer handle.
SpscRing
A bounded SPSC ring. CAP must be a power of two.
SpscSender
Producer handle.

Functions§

channel
Pairs a ring with its two ends for handing to separate threads.