Crate scbuf

Source
Expand description

§scbuf

scbuf (sync circular buffer) is a Send and Sync, lock-free circular buffer implementation.

In the single-producer, single-consumer scenario, it relies solely on atomics for synchronization. See new_scbuf for multiple-producer/consumer usage.

Structs§

ConsEnd
Consumer endpoint for retrieving data from the circular buffer. See ConsEnd::pop() and ConsEnd::read().
ProdEnd
Producer endpoint for inserting data into the circular buffer. See ProdEnd::push() and ProdEnd::write().

Functions§

new_scbuf
Creates a new circular buffer with the given capacity and returns one consumer and one producer endpoint.