Trait mz_ore::task::JoinSetExt

source ·
pub trait JoinSetExt<T> {
    // Required method
    fn spawn_named<Fut, Name, NameClosure>(
        &mut self,
        nc: NameClosure,
        future: Fut
    ) -> AbortHandle
       where Name: AsRef<str>,
             NameClosure: FnOnce() -> Name,
             Fut: Future<Output = T> + Send + 'static,
             T: Send + 'static;
}
Available on crate feature async only.
Expand description

Extension methods for tokio::task::JoinSet.

See the module docs for more information.

Required Methods§

source

fn spawn_named<Fut, Name, NameClosure>( &mut self, nc: NameClosure, future: Fut ) -> AbortHandle
where Name: AsRef<str>, NameClosure: FnOnce() -> Name, Fut: Future<Output = T> + Send + 'static, T: Send + 'static,

Spawns a new asynchronous task with a name.

See tokio::task::spawn and the module docs for more information.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> JoinSetExt<T> for JoinSet<T>

source§

fn spawn_named<Fut, Name, NameClosure>( &mut self, nc: NameClosure, future: Fut ) -> AbortHandle
where Name: AsRef<str>, NameClosure: FnOnce() -> Name, Fut: Future<Output = T> + Send + 'static, T: Send + 'static,

Implementors§