pub fn spawn_immortal<F, T>(f: F) -> JoinHandle<T>Expand description
Use to spawn a thread that will be restarted automatically (after a one second delay) if it panics. Primarily useful for running an infinite-lifetime job (like a webserver) in another thread. If the passed function exits cleanly, it is not restarted.