Skip to main content

try_spawn

Function try_spawn 

Source
pub fn try_spawn<F, T>(
    future: F,
) -> Result<JoinHandle<T>, (RuntimeConfigError, F)>
where F: Future<Output = T> + Send + 'static, T: Send + 'static,
Expand description

Submit a future without consuming it when the runtime is not accepting work.

Lifecycle owners can retain the returned future and retry it after start completes a runtime restart.