#[repr(C)]pub struct WorkStealQueue<T: Debug> { /* private fields */ }
Expand description
Work stealing global queue, shared by multiple threads.
Implementations§
Source§impl<T: Debug> WorkStealQueue<T>
impl<T: Debug> WorkStealQueue<T>
Sourcepub fn get_instance<'s>() -> &'s WorkStealQueue<T>
pub fn get_instance<'s>() -> &'s WorkStealQueue<T>
Get a global WorkStealQueue
instance.
Sourcepub fn new(local_queues_size: usize, local_capacity: usize) -> Self
pub fn new(local_queues_size: usize, local_capacity: usize) -> Self
Create a new WorkStealQueue
instance.
Sourcepub fn local_queue(&self) -> LocalQueue<'_, T>
pub fn local_queue(&self) -> LocalQueue<'_, T>
Get a local queue, this method should be called up to local_queue_size
times.
§Panics
should never happens
Trait Implementations§
Source§impl<T: Debug> Default for WorkStealQueue<T>
impl<T: Debug> Default for WorkStealQueue<T>
Auto Trait Implementations§
impl<T> !Freeze for WorkStealQueue<T>
impl<T> !RefUnwindSafe for WorkStealQueue<T>
impl<T> Send for WorkStealQueue<T>where
T: Send,
impl<T> !Sync for WorkStealQueue<T>
impl<T> Unpin for WorkStealQueue<T>where
T: Unpin,
impl<T> !UnwindSafe for WorkStealQueue<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