spawn

Function spawn 

Source
pub fn spawn<T: 'static + Send>(
    f: impl 'static + Send + FnOnce() -> T,
) -> Task<T>
Expand description

Spawns an asynchronous task on the global thread pool. The returned handle can be used to obtain the result.