pub struct Worker { /* private fields */ }Implementations§
Source§impl Worker
impl Worker
pub fn new( id: usize, keep_going: Arc<AtomicBool>, ) -> (Self, Stealer<TypeErased>)
Source§impl Worker
impl Worker
pub fn sync<I, O>(&mut self, _: SpawnToken<'_, I, O>) -> O
pub fn spawn<'task, I: 'task, O: 'task>( &mut self, task: fn(&mut Worker, I) -> O, input: I, ) -> SpawnToken<'task, I, O>
pub fn join<A, B, RA, RB>( &mut self, task_a: fn(&mut Worker, A) -> RA, a: A, task_b: fn(&mut Worker, B) -> RB, b: B, ) -> (RA, RB)
Auto Trait Implementations§
impl !RefUnwindSafe for Worker
impl !UnwindSafe for Worker
impl Freeze for Worker
impl Send for Worker
impl Sync for Worker
impl Unpin for Worker
impl UnsafeUnpin for Worker
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