Function spawn

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

Spawn a new async task

§Panics

This function panics if the current runtime is not set