Skip to main content

spawn

Function spawn 

Source
pub fn spawn<F>(future: F) -> JoinHandle<F::Output>
where F: Future + Send + 'static, F::Output: Send + 'static,
Expand description

Spawns a task onto the thread-local Tokio runtime.

Panics when the current thread has not been initialized with init_runtime.