pub struct Workers<'scope, T, O, P> { /* private fields */ }Expand description
Borrowing authority to start and observe the scope-owned workers.
Implementations§
Source§impl<T, O, P> Workers<'_, T, O, P>
impl<T, O, P> Workers<'_, T, O, P>
pub fn entries(&self) -> &[Slot<T, O, P>]
Sourcepub fn parents_mut(&mut self) -> impl ExactSizeIterator<Item = &mut P>
pub fn parents_mut(&mut self) -> impl ExactSizeIterator<Item = &mut P>
Mutably borrows only coordinator metadata for the started worker prefix. Native entries retain exclusive access to their task and output cells.
Source§impl<T, O, P> Workers<'_, T, O, P>
impl<T, O, P> Workers<'_, T, O, P>
Sourcepub fn start(&mut self, stack: NonZero<usize>) -> Result<(), (&P, Error)>where
T: Task<Output = O>,
pub fn start(&mut self, stack: NonZero<usize>) -> Result<(), (&P, Error)>where
T: Task<Output = O>,
Spawns the remaining workers. The outer group owns every slot through each join, so the context pointer stays valid until its handle joins. A failure borrows the exact unstarted worker’s parent metadata.
Auto Trait Implementations§
impl<'scope, T, O, P> !RefUnwindSafe for Workers<'scope, T, O, P>
impl<'scope, T, O, P> !Send for Workers<'scope, T, O, P>
impl<'scope, T, O, P> !Sync for Workers<'scope, T, O, P>
impl<'scope, T, O, P> !UnwindSafe for Workers<'scope, T, O, P>
impl<'scope, T, O, P> Freeze for Workers<'scope, T, O, P>where
&'scope mut Group<T, O, P>: Freeze,
impl<'scope, T, O, P> Unpin for Workers<'scope, T, O, P>where
&'scope mut Group<T, O, P>: Unpin,
impl<'scope, T, O, P> UnsafeUnpin for Workers<'scope, T, O, P>where
&'scope mut Group<T, O, P>: UnsafeUnpin,
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