pub struct TaskHandles { /* private fields */ }Expand description
Stores async task handles without imposing spawn or join policy.
Implementations§
Source§impl TaskHandles
impl TaskHandles
Sourcepub fn push(&self, handle: JoinHandle<()>)
pub fn push(&self, handle: JoinHandle<()>)
Stores handle after removing handles for completed tasks.
Sourcepub fn abort_all_retained(&self)
pub fn abort_all_retained(&self)
Aborts all stored task handles without draining them, so callers can await their
termination later through Self::all_finished.
Sourcepub fn take_all(&self) -> Vec<JoinHandle<()>>
pub fn take_all(&self) -> Vec<JoinHandle<()>>
Removes and returns all stored task handles.
Sourcepub fn all_finished(&self) -> bool
pub fn all_finished(&self) -> bool
Returns whether every stored task handle has finished.
Trait Implementations§
Source§impl Debug for TaskHandles
impl Debug for TaskHandles
Source§impl Default for TaskHandles
impl Default for TaskHandles
Source§fn default() -> TaskHandles
fn default() -> TaskHandles
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for TaskHandles
impl !RefUnwindSafe for TaskHandles
impl Send for TaskHandles
impl Sync for TaskHandles
impl Unpin for TaskHandles
impl UnsafeUnpin for TaskHandles
impl UnwindSafe for TaskHandles
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