Expand description
Fixed capacity Single Producer Single Consumer Ringbuffer with no mutex protection. Implementation based on https://www.snellman.net/blog/archive/2016-12-13-ring-buffers/
Structs§
- Index
- Internal Index struct emcapsulating masking and wrapping operations according to size const size N. Note that we deliberately use u32 to limit the index to 4 bytes and max supported capacity to 2^31-1
- Ring
BufRef - A ring buffer of capacity N holding items of type T. Non power-of-two N is supported but less efficient.