pub fn spawn_blocking<F, R>(f: F) -> BlockingResult<R> ⓘExpand description
Submits blocking work and returns a future for its result.
If a system is running, work is submitted to its blocking thread pool. Otherwise, the closure runs immediately on the current thread.
Dropping the returned future prevents queued work from starting, but cannot
interrupt work that is already running. Call BlockingResult::detach to
let queued work continue even if its result is no longer needed.