Struct atomic_try_update::claim::WriteOrderingQueue
source · pub struct WriteOrderingQueue<T>{ /* private fields */ }Implementations§
source§impl<T> WriteOrderingQueue<T>
impl<T> WriteOrderingQueue<T>
This is a multi-producer “claim” queue.
sourcepub fn push(&self, val: T) -> (u64, bool)
pub fn push(&self, val: T) -> (u64, bool)
This returns the offset of the write, and true iff we have the claim. If we have the claim, we are responsible for calling consume_or_release_claim until we manage to release it.
sourcepub fn consume_or_release_claim(&self) -> (NodeIterator<T>, bool)
pub fn consume_or_release_claim(&self) -> (NodeIterator<T>, bool)
This removes everything from the queue. If queue is already empty, it releases the claim and returns false
pub fn get_offset(&self) -> u64
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for WriteOrderingQueue<T>where
T: RefUnwindSafe,
impl<T> Send for WriteOrderingQueue<T>
impl<T> Sync for WriteOrderingQueue<T>
impl<T> Unpin for WriteOrderingQueue<T>
impl<T> UnwindSafe for WriteOrderingQueue<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