Function spawn_compute

Source
pub fn spawn_compute<F, T>(func: F) -> TokioRayonJoinHandle<T> 
where F: FnOnce() -> T + Send + 'static, T: Send + 'static,
Expand description

Spawns a compute intensive task on the rayon global threadpool and returns a future that can be awaited without blocking the async task.