Skip to main content

spawn_catch_panic

Function spawn_catch_panic 

Source
pub fn spawn_catch_panic<F>(future: F) -> JoinHandle<F::Output> 
where F: Future + Send + 'static, F::Output: Send + 'static,
Expand description

Spawns a new asynchronous task and catches any panics that occur within it.

If a panic occurs, it will be caught by the custom panic hook.