Trait sp_core::traits::SpawnEssentialNamed [−][src]
pub trait SpawnEssentialNamed: DynClone + Send + Sync { fn spawn_essential_blocking(
&self,
name: &'static str,
future: BoxFuture<'static, ()>
); fn spawn_essential(
&self,
name: &'static str,
future: BoxFuture<'static, ()>
); }
Expand description
Something that can spawn essential tasks (blocking and non-blocking) with an assigned name.
Essential tasks are special tasks that should take down the node when they end.
Required methods
fn spawn_essential_blocking(
&self,
name: &'static str,
future: BoxFuture<'static, ()>
)
fn spawn_essential_blocking(
&self,
name: &'static str,
future: BoxFuture<'static, ()>
)
Spawn the given blocking future.
The given name
is used to identify the future in tracing.
fn spawn_essential(&self, name: &'static str, future: BoxFuture<'static, ()>)
fn spawn_essential(&self, name: &'static str, future: BoxFuture<'static, ()>)
Spawn the given non-blocking future.
The given name
is used to identify the future in tracing.