pub struct MutexVecQueue<T> { /* private fields */ }Expand description
A wrapper around LightArc<Mutex<VecQueue<T>>>.
It can be used as a global queue.
It implements BatchReceiver and LockFreeBatchReceiver with returning an error when it should wait.
Implementations§
Source§impl<T> MutexVecQueue<T>
impl<T> MutexVecQueue<T>
Sourcepub fn move_batch_to_producer(
&self,
producer: &impl SingleProducer<T>,
limit: usize,
)
pub fn move_batch_to_producer( &self, producer: &impl SingleProducer<T>, limit: usize, )
Moves at most limit elements from the queue to the producer.
Trait Implementations§
Source§impl<T> BatchReceiver<T> for MutexVecQueue<T>
impl<T> BatchReceiver<T> for MutexVecQueue<T>
Source§impl<T: Clone> Clone for MutexVecQueue<T>
impl<T: Clone> Clone for MutexVecQueue<T>
Source§fn clone(&self) -> MutexVecQueue<T>
fn clone(&self) -> MutexVecQueue<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Default for MutexVecQueue<T>
impl<T> Default for MutexVecQueue<T>
Source§impl<T> LockFreeBatchReceiver<T> for MutexVecQueue<T>
impl<T> LockFreeBatchReceiver<T> for MutexVecQueue<T>
Source§unsafe fn lock_free_push_many_and_slice_and_commit_if<F, FSuccess, FError>(
&self,
first: &[T],
last: &[T],
slice: &[T],
f: F,
) -> Result<FSuccess, LockFreePushBatchErr<(), FError>>
unsafe fn lock_free_push_many_and_slice_and_commit_if<F, FSuccess, FError>( &self, first: &[T], last: &[T], slice: &[T], f: F, ) -> Result<FSuccess, LockFreePushBatchErr<(), FError>>
Pushes a batch of values to the receiver but commits it only if the function returns
true. Read moreAuto Trait Implementations§
impl<T> Freeze for MutexVecQueue<T>
impl<T> RefUnwindSafe for MutexVecQueue<T>
impl<T> !Send for MutexVecQueue<T>
impl<T> !Sync for MutexVecQueue<T>
impl<T> Unpin for MutexVecQueue<T>
impl<T> UnwindSafe for MutexVecQueue<T>
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