pub struct WorkQueue { /* private fields */ }Expand description
Global work queue for task injection.
Implementations§
Source§impl WorkQueue
impl WorkQueue
Sourcepub fn push_batch(&self, tasks: Vec<Task>)
pub fn push_batch(&self, tasks: Vec<Task>)
Push multiple tasks to the global queue.
Sourcepub fn steal_global(&self) -> Option<Task>
pub fn steal_global(&self) -> Option<Task>
Steal a task from the global queue.
Sourcepub fn register_worker(&self)
pub fn register_worker(&self)
Register a new worker.
Sourcepub fn unregister_worker(&self)
pub fn unregister_worker(&self)
Unregister a worker.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WorkQueue
impl !UnwindSafe for WorkQueue
impl RefUnwindSafe for WorkQueue
impl Send for WorkQueue
impl Sync for WorkQueue
impl Unpin for WorkQueue
impl UnsafeUnpin for WorkQueue
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