pub fn spawn<T>(
future: impl Future<Output = T> + Send + 'static,
) -> JoinHandle<T> ⓘwhere
T: Send + 'static,Expand description
Spawns a future onto the current runtime.
Returns a JoinHandle that can be awaited to get the future’s result.
§Panics
- If no runtime is currently running