Trait Spawner

Source
pub trait Spawner: Send + Sync {
    // Required method
    fn spawn_blocking(&self, f: impl FnOnce() + Send + 'static);
}
Expand description

Wrapper around a spawn function

Required Methods§

Source

fn spawn_blocking(&self, f: impl FnOnce() + Send + 'static)

Called by the cache tracker to spawn a small, blocking, io bound task

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§