pub trait JoinSetLike<T>: Send {
// Required methods
fn spawn<F>(&mut self, future: F)
where F: Future<Output = T> + Send + 'static;
fn join_next(
&mut self,
) -> impl Future<Output = Option<Result<T, JoinError>>> + Send + '_;
fn abort_all(&mut self);
}Expand description
A handle that yields a task’s result on await and supports
abort. Matches tokio::task::JoinSet’s shape.
Required Methods§
Sourcefn spawn<F>(&mut self, future: F)
fn spawn<F>(&mut self, future: F)
Spawn a future onto the set. The future is Send + 'static
because it crosses task boundaries.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".