pub struct WorkMember<'group> { /* private fields */ }Expand description
A work object owned by a CleanupGroup.
Behaves like ThreadpoolWork but is released by the group rather than by
its own drop.
Implementations§
Source§impl WorkMember<'_>
impl WorkMember<'_>
Sourcepub fn stop_and_drain(&self)
pub fn stop_and_drain(&self)
Stop accepting work and block until none is queued or executing.
As on ThreadpoolWork, there is nothing to stop – a submission
cannot be withdrawn, only waited for – so this is exactly
wait. The name exists so a caller tearing down a mixed
set of objects can reach for one method.
Sourcepub fn cancel_pending(&self)
pub fn cancel_pending(&self)
Cancel invocations that have not started, then wait for those that have.
Trait Implementations§
Auto Trait Implementations§
impl<'group> Freeze for WorkMember<'group>
impl<'group> RefUnwindSafe for WorkMember<'group>
impl<'group> Send for WorkMember<'group>
impl<'group> Sync for WorkMember<'group>
impl<'group> Unpin for WorkMember<'group>
impl<'group> UnsafeUnpin for WorkMember<'group>
impl<'group> UnwindSafe for WorkMember<'group>
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