pub struct Queue<'a, T, P = <SplitVec<T> as IntoConcurrentPinnedVec<T>>::ConPinnedVec>where
T: Send,
P: ConcurrentPinnedVec<T>,{ /* private fields */ }Expand description
A queue of elements that will be returned by the ConcurrentRecursiveIter.
Note that the concurrent recursive iterator is built on top of the ConcurrentQueue.
Queue is just a wrapper over the concurrent queue, exposing only two methods:
pushto add one task at a time,extendto add multiple tasks with known length together with a single update.
Notice that push is very flexible and makes the pushed element available for iteration
as fast as possible.
On the other hand, extend minimizes the overhead of concurrency.
Implementationsยง
Sourceยงimpl<T, P> Queue<'_, T, P>where
T: Send,
P: ConcurrentPinnedVec<T>,
impl<T, P> Queue<'_, T, P>where
T: Send,
P: ConcurrentPinnedVec<T>,
Sourcepub fn push(&self, element: T)
pub fn push(&self, element: T)
Pushes the element to the iterator, making it available to all threads as fast as possible.
Trait Implementationsยง
Sourceยงimpl<'a, T, P> From<&'a ConcurrentQueue<T, P>> for Queue<'a, T, P>where
T: Send,
P: ConcurrentPinnedVec<T>,
impl<'a, T, P> From<&'a ConcurrentQueue<T, P>> for Queue<'a, T, P>where
T: Send,
P: ConcurrentPinnedVec<T>,
Sourceยงfn from(queue: &'a ConcurrentQueue<T, P>) -> Queue<'a, T, P>
fn from(queue: &'a ConcurrentQueue<T, P>) -> Queue<'a, T, P>
Converts to this type from the input type.
Auto Trait Implementationsยง
impl<'a, T, P> Freeze for Queue<'a, T, P>
impl<'a, T, P> RefUnwindSafe for Queue<'a, T, P>where
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, P> Send for Queue<'a, T, P>
impl<'a, T, P> Sync for Queue<'a, T, P>
impl<'a, T, P> Unpin for Queue<'a, T, P>
impl<'a, T, P> UnwindSafe for Queue<'a, T, P>where
P: RefUnwindSafe,
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