Function shuttle::thread::spawn

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

Spawn a new thread, returning a JoinHandle for it.

The join handle can be used (via the join method) to block until the child thread has finished.