Skip to main content

try_spawn

Function try_spawn 

Source
pub fn try_spawn<F, T>(f: F) -> Result<JoinHandle<T>, SpawnError>
where F: FnOnce() -> T + Send + 'static, T: Send + 'static,
Expand description

Same as spawn but captures thread creation failure.