oneringbuf 0.7.1

A lock-free single-producer, single-consumer (SPSC) ring buffer with in-place mutability, asynchronous support, and virtual memory optimisation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::common_def;

pub mod new_buf;
pub mod stack;
pub mod uninit_buf;

#[cfg(all(feature = "vmem", unix))]
#[test]
fn vmem_no_double_free_with_heap_owning_t() {
    common_def!();

    let v: Vec<Vec<usize>> = (0..BUFFER_SIZE).map(|i| vec![i, i+1, i+2]).collect();
    let rb = oneringbuf::SharedVmemRB::from(v);
    drop(rb);
    // Should not abort under glibc; should not flag under sanitisers.
}