Skip to main content

Module blocking_spsc_ring

Module blocking_spsc_ring 

Source
Expand description

BlockingSpscRing: SPSC ring with cross-process futex-shaped recv_blocking(timeout) / send_blocking(timeout).

Wraps SpscRingCore + CrossProcessWaker. The hot path (try_send / try_recv) stays the same as the bare SPSC primitive. The blocking calls park the caller on the waker when the ring is empty (recv) or full (send), and the counterparty’s post-publish path fires a single-slot wake to release them.

See crate::cross_process_waker for the wake protocol + storage layout. See examples/blocking_spsc_e2e.rs for the intra-process worked example and examples/blocking_spsc_xproc_producer.rs + ..._consumer.rs for the cross-process pair.

Structs§

BlockingSpscRing
SPSC ring with cross-process blocking recv / send.
PhaseRecvStats
Instrumentation for BlockingSpscRing::recv_phase_locked: how each item was caught. The headline ratio is spin_catches (no wake syscall) vs doorbell_catches (a park/wake round-trip).

Enums§

BlockingError
Errors returned by the blocking variant.