Function spawn

Source
pub fn spawn<F, T>(intent: ThreadIntent, f: F) -> JoinHandle<T>
where F: FnOnce() -> T + Send + 'static, T: Send + 'static,
Expand description

§Panics

Panics if failed to spawn the thread.