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§
sourcefn spawn_named<Fut, Name, NameClosure>(
&mut self,
nc: NameClosure,
future: Fut,
) -> AbortHandle
fn spawn_named<Fut, Name, NameClosure>( &mut self, nc: NameClosure, future: Fut, ) -> AbortHandle
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.