spawn

Function spawn 

Source
pub fn spawn<Fut>(fut: Fut) -> AnyExecutorTask<Fut::Output> 
where Fut: Future<Output: Send> + Send + 'static,
Expand description

Spawn a Send future on the global executor.

The global executor must be initialized with init_global_executor before calling this function.

§Panics

Panics if the global executor has not been set.