stratus::ext

Function spawn_thread

Source
pub fn spawn_thread<T>(
    name: &str,
    task: impl FnOnce() -> T + Send + 'static,
) -> JoinHandle<T>
where T: Send + 'static,
Expand description

Spawns a thread with the given name. Thread has access to Tokio current runtime.