spawn

Function spawn 

Source
pub fn spawn<Fut>(fut: Fut) -> AnyExecutorTask<<Fut as Future>::Output>
where Fut: Future + Send + 'static, <Fut as Future>::Output: Send,
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.