pub fn spawn<T: Send + 'static>(
name: impl Into<String>,
work: impl FnOnce() -> T + Send + 'static,
) -> Result<JoinHandle<T>>Expand description
Starts a library thread named name, with a STACK_SIZE stack, that
runs work.
§Errors
Fails when the operating system can’t start the thread.