Struct ArrayQueue
pub struct ArrayQueue<T> { /* private fields */ }Expand description
A bounded lock-free queue, from the kovan-queue crate: see its docs. A bounded multi-producer multi-consumer queue.
Implementations§
§impl<T> ArrayQueue<T>
impl<T> ArrayQueue<T>
pub fn new(cap: usize) -> ArrayQueue<T>
pub fn new(cap: usize) -> ArrayQueue<T>
Creates a new bounded queue with the given capacity.
The capacity will be rounded up to the next power of two.
Trait Implementations§
§impl<T> Drop for ArrayQueue<T>
Drop all remaining values in the queue when it is dropped.
impl<T> Drop for ArrayQueue<T>
Drop all remaining values in the queue when it is dropped.
Without this, T values sitting in initialized slots would have their
memory freed (the Box<[Slot<T>]> backing is released) without ever
calling T::drop(), leaking resources such as file handles or locks.
impl<T> Send for ArrayQueue<T>where
T: Send,
impl<T> Sync for ArrayQueue<T>where
T: Send,
Auto Trait Implementations§
impl<T> !Freeze for ArrayQueue<T>
impl<T> !RefUnwindSafe for ArrayQueue<T>
impl<T> Unpin for ArrayQueue<T>
impl<T> UnsafeUnpin for ArrayQueue<T>
impl<T> UnwindSafe for ArrayQueue<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more