Function stoppable_thread::spawn [] [src]

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

Spawn a stoppable thread

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