[][src]Trait sp_core::traits::SpawnNamed

pub trait SpawnNamed: DynClone + Send + Sync {
    pub fn spawn_blocking(
        &self,
        name: &'static str,
        future: BoxFuture<'static, ()>
    );
pub fn spawn(&self, name: &'static str, future: BoxFuture<'static, ()>); }

Something that can spawn futures (blocking and non-blocking) with an assigned name.

Required methods

pub fn spawn_blocking(&self, name: &'static str, future: BoxFuture<'static, ()>)[src]

Spawn the given blocking future.

The given name is used to identify the future in tracing.

pub fn spawn(&self, name: &'static str, future: BoxFuture<'static, ()>)[src]

Spawn the given non-blocking future.

The given name is used to identify the future in tracing.

Loading content...

Implementations on Foreign Types

impl SpawnNamed for Box<dyn SpawnNamed>[src]

Loading content...

Implementors

impl SpawnNamed for TaskExecutor[src]

Loading content...