pub struct TaskGroup<E> { /* private fields */ }
Expand description
A TaskGroup is used to spawn a collection of tasks. The collection has two properties:
- if any task returns an error or panicks, all tasks are terminated.
- if the
JoinHandle
returned bygroup
is dropped, all tasks are terminated.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<E> Freeze for TaskGroup<E>
impl<E> RefUnwindSafe for TaskGroup<E>
impl<E> Send for TaskGroup<E>where
E: Send,
impl<E> Sync for TaskGroup<E>where
E: Send,
impl<E> Unpin for TaskGroup<E>
impl<E> UnwindSafe for TaskGroup<E>
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