spawn

Function spawn 

Source
pub async fn spawn<F, R>(func: F) -> R
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
Expand description

Queue a new command for execution on the global threadpool.

If no global threadpool has been created, then this function runs the provided closure immediately, without passing it to a blocking threadpool.