Function spawn

Source
pub fn spawn<F, T>(f: F) -> StoppableHandle<T>
where F: FnOnce(&SimpleAtomicBool) -> T + Send + 'static, T: Send + 'static,
Expand description

Spawn a stoppable thread

Works similar to like std::thread::spawn, except that a &SimpleAtomicBool is passed into f.