1 2 3 4 5 6 7
pub fn spawn_blocking<F, R>(f: F) -> std::thread::JoinHandle<R> where F: FnOnce() -> R + Send + 'static, R: Send + 'static, { std::thread::spawn(f) }