Trait sp_core::traits::SpawnNamed [−][src]
pub trait SpawnNamed: DynClone + Send + Sync { fn spawn_blocking(&self, name: &'static str, future: BoxFuture<'static, ()>); fn spawn(&self, name: &'static str, future: BoxFuture<'static, ()>); }
Expand description
Something that can spawn tasks (blocking and non-blocking) with an assigned name.
Required methods
fn spawn_blocking(&self, name: &'static str, future: BoxFuture<'static, ()>)
fn spawn_blocking(&self, name: &'static str, future: BoxFuture<'static, ()>)
Spawn the given blocking future.
The given name
is used to identify the future in tracing.
Implementations on Foreign Types
Implementors
impl SpawnNamed for TaskExecutor
impl SpawnNamed for TaskExecutor
impl SpawnNamed for SpawnTaskHandle
impl SpawnNamed for SpawnTaskHandle