Skip to main content

try_spawn_async

Function try_spawn_async 

Source
pub fn try_spawn_async<TFn, TFuture, T>(
    f: TFn,
) -> Result<JoinHandle<T>, SpawnError>
where TFn: FnOnce() -> TFuture + Send + 'static, TFuture: Future<Output = T> + 'static, T: Send + 'static,
Expand description

Same as spawn_async but captures thread creation failure.