tokio_rayon

Function spawn_fifo

Source
pub fn spawn_fifo<F, R>(func: F) -> AsyncRayonHandle<R> 
where F: FnOnce() -> R + Send + 'static, R: Send + 'static,
Expand description

Asynchronous wrapper around Rayon’s spawn_fifo.

Runs a function on the global Rayon thread pool with FIFO priority, produciing a future that resolves with the function’s return value.

§Panics

If the task function panics, the panic will be propagated through the returned future. This will NOT trigger the Rayon thread pool’s panic handler.

If the returned handle is dropped, and the return value of func panics when dropped, then that panic WILL trigger the thread pool’s panic handler.