pub fn new(capacity: usize) -> Self {
        let vec_cap = capacity + 1;
        let mut data = Vec::with_capacity(vec_cap);
        unsafe { data.set_len(vec_cap); }
        Self {
            data: SharedVec::new(data),
            head: AtomicUsize::new(0),
            tail: AtomicUsize::new(0),
        }
    }
/// Creates a new instance of a ring buffer.
Creates a new instance of a ring buffer.
Creates a new instance of a ring buffer .
pub fn new(capacity: usize) -> Self {
        let vec_cap = capacity + 1;
        let mut data = Vec::with_capacity(vec_cap);
        unsafe { data.set_len(vec_cap); }
        Self {
            data: SharedVec::new(data),
            head: AtomicUsize::new(0),
            tail: AtomicUsize::new(0),
        }
    }
pub fn new ( capacity : usize ) -> Self { let vec_cap = capacity + 1 ; let mut data = Vec :: with_capacity ( vec_cap ) ; unsafe { data . set_len ( vec_cap ) ; } Self { data : SharedVec :: new ( data ) , head : AtomicUsize :: new ( 0 ) , tail : AtomicUsize :: new ( 0 ) , } }
Creates a new instance of a ring buffer.
Creates a new instance of a ring buffer .
capacity
usize
capacity
usize