Overview of ringbuf
masterringbuf is a lock-free Single-Producer Single-Consumer (SPSC) FIFO ring buffer that provides direct access to its internal data. It is designed for high performance and flexibility, supporting arbitrary item types (not just Copy types) and various storage backends.
Key features include:
- Lock-free operations: Methods succeed or fail immediately without blocking.
- Flexible Storage: Can be used with
stdandalloc, or inno_std/no_allocenvironments using statically-allocated memory. - Batch Operations: Supports inserting and removing items one by one or in bulk.
- Overwrite Mode: Supports overwriting the oldest elements when the buffer is full.
- Async/Blocking Support: Available via derived crates
async-ringbufandringbuf-blocking.