spawn_async

Function spawn_async 

Source
pub fn spawn_async<F, T>(async_func: F) -> JoinHandle<T>
where F: Future<Output = T> + Send + 'static, T: Send + 'static,
Expand description

Spawn an async task and return a handle to it.

This is a convenience wrapper around tokio::spawn that works from both sync and async contexts.