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 new asynchronous task with default options.

This is a convenience function for spawn_builder().

By default, the spawned task is attached to the current task in the task tree and will be cancelled if its parent exits, respecting the runtime’s OrphanPolicy.