Struct af_core::task::join::Join [−][src]
Concurrently waits for the results of multiple tasks.
Implementations
impl<T> Join<T> where
T: Send + 'static, [src]
T: Send + 'static,
pub fn new() -> Self[src]
Creates an empty join.
pub fn add(&mut self, task: impl Start<T>) -> Index[src]
Adds a task to the join, returning its index.
pub fn add_as(
&mut self,
name: impl Into<SharedString>,
task: impl Start<T>
) -> Index[src]
&mut self,
name: impl Into<SharedString>,
task: impl Start<T>
) -> Index
Adds a named task to the join, returning its index.
pub async fn next(&mut self) -> Option<StoppedTask<Result<T, Panic>>>[src]
Waits for the next stopped task.
If all tasks have stopped, this function returns None.
pub async fn try_next(&mut self) -> Option<Result<StoppedTask<T>, PanickedTask>>[src]
Waits for the next stopped task and returns its information as a
Result.
If all tasks have stopped, this function returns None.
pub async fn drain(&mut self)[src]
Waits for all tasks to stop, dropping their results.
pub async fn try_drain(&mut self) -> Result<(), PanickedTask>[src]
Waits for all tasks to stop, dropping their results, until a task panics.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Join<T>
impl<T> Send for Join<T> where
T: Send,
T: Send,
impl<T> Sync for Join<T> where
T: Send,
T: Send,
impl<T> Unpin for Join<T>
impl<T> UnwindSafe for Join<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,