pub struct WfQueue { /* private fields */ }
Implementations§
Source§impl WfQueue
impl WfQueue
pub fn new(cap: usize) -> WfQueue
pub fn len(&self) -> usize
pub fn capacity(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn is_full(&self) -> bool
Sourcepub fn try_enqueue(&self, ctx: &EnqueueCtx, val: NonZeroUsize) -> bool
pub fn try_enqueue(&self, ctx: &EnqueueCtx, val: NonZeroUsize) -> bool
Each queue should use a fixed enqueue context in each thread. If the wrong context is used, it may lead to logic confusion.
Sourcepub fn try_dequeue(&self, ctx: &DequeueCtx) -> Option<NonZeroUsize>
pub fn try_dequeue(&self, ctx: &DequeueCtx) -> Option<NonZeroUsize>
Each queue should use a fixed enqueue context in each thread. If the wrong context is used, it may lead to logic confusion.
Auto Trait Implementations§
impl !Freeze for WfQueue
impl RefUnwindSafe for WfQueue
impl Send for WfQueue
impl Sync for WfQueue
impl Unpin for WfQueue
impl UnwindSafe for WfQueue
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