#[repr(align(64))]pub struct LockFreeQueue<T> { /* private fields */ }
Expand description
Lock-free queue for fast thread scheduling.
Implementations§
Source§impl<T> LockFreeQueue<T>
impl<T> LockFreeQueue<T>
pub fn new() -> Self
Sourcepub fn fast_enqueue(&self, item: T) -> Result<(), T>
pub fn fast_enqueue(&self, item: T) -> Result<(), T>
Fast path enqueue (Michael & Scott algorithm).
Sourcepub fn fast_dequeue(&self) -> Option<T>
pub fn fast_dequeue(&self) -> Option<T>
Fast path dequeue.
Sourcepub fn fast_is_empty(&self) -> bool
pub fn fast_is_empty(&self) -> bool
Fast empty check.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for LockFreeQueue<T>
impl<T> RefUnwindSafe for LockFreeQueue<T>
impl<T> Send for LockFreeQueue<T>
impl<T> Sync for LockFreeQueue<T>
impl<T> Unpin for LockFreeQueue<T>
impl<T> UnwindSafe for LockFreeQueue<T>where
T: RefUnwindSafe,
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