Struct async_task_group::GroupJoinHandle [−][src]
pub struct GroupJoinHandle<E> { /* fields omitted */ }
Expand description
A JoinHandle is used to manage a collection of tasks. There are two things you can do with it:
- JoinHandle impls Future, so you can poll or await on it. It will be
Ready when all tasks return Ok(()) and the associated
TaskGroup
is dropped (so no more tasks can be created), or when any task panicks or returns an Err(E). - When a JoinHandle is dropped, all tasks it contains are canceled
(terminated). So, if you use a combinator like
tokio::time::timeout(duration, task_manager).await
, all tasks will be terminated if the timeout occurs.
Trait Implementations
Auto Trait Implementations
impl<E> RefUnwindSafe for GroupJoinHandle<E>
impl<E> Send for GroupJoinHandle<E> where
E: Send,
impl<E> Sync for GroupJoinHandle<E> where
E: Send,
impl<E> Unpin for GroupJoinHandle<E>
impl<E> UnwindSafe for GroupJoinHandle<E>
Blanket Implementations
Mutably borrows from an owned value. Read more
Returns a Future that delays execution for a specified time. Read more
fn flatten(self) -> FlattenFuture<Self, <Self::Output as IntoFuture>::Future> where
Self::Output: IntoFuture,
fn flatten(self) -> FlattenFuture<Self, <Self::Output as IntoFuture>::Future> where
Self::Output: IntoFuture,
Flatten out the execution of this future when the result itself can be converted into another future. Read more
Waits for one of two similarly-typed futures to complete. Read more
Waits for one of two similarly-typed fallible futures to complete. Read more
Waits for two similarly-typed futures to complete. Read more
Waits for two similarly-typed fallible futures to complete. Read more
A convenience for calling Future::poll()
on !
Unpin
types.
Returns the result of self
or other
future, preferring self
if both are ready. Read more
Returns the result of self
or other
future, with no preference if both are ready. Read more
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe,
fn catch_unwind(self) -> CatchUnwind<Self> where
Self: UnwindSafe,
Catches panics while polling the future. Read more
Boxes the future and changes its type to dyn Future + Send + 'a
. Read more
into_future
)The output that the future will produce on completion.
type Future = F
type Future = F
into_future
)Which kind of future are we turning this into?
into_future
)Creates a future from a value.
type Future = T
type Future = T
Which kind of future are we turning this into?
Create a future from a value