pub struct WorkStealingQueue<T> { /* private fields */ }Expand description
A per-worker work-stealing deque.
The owner pushes/pops from the back; thieves steal from the front.
Implementations§
Source§impl<T> WorkStealingQueue<T>
impl<T> WorkStealingQueue<T>
Sourcepub fn pop(&mut self) -> Option<T>
pub fn pop(&mut self) -> Option<T>
Pop a task for the owner to execute.
Checks the stolen buffer first (so stolen tasks are prioritised),
then falls back to the local deque (LIFO).
Trait Implementations§
Source§impl<T: Debug> Debug for WorkStealingQueue<T>
impl<T: Debug> Debug for WorkStealingQueue<T>
Auto Trait Implementations§
impl<T> Freeze for WorkStealingQueue<T>
impl<T> RefUnwindSafe for WorkStealingQueue<T>where
T: RefUnwindSafe,
impl<T> Send for WorkStealingQueue<T>where
T: Send,
impl<T> Sync for WorkStealingQueue<T>where
T: Sync,
impl<T> Unpin for WorkStealingQueue<T>where
T: Unpin,
impl<T> UnsafeUnpin for WorkStealingQueue<T>
impl<T> UnwindSafe for WorkStealingQueue<T>where
T: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request