Function rayon::source ·
pub fn spawn_fifo<F>(func: F)where F: FnOnce() + Send + 'static,
Fires off a task into the Rayon threadpool in the “static” or
“global” scope. Just like a standard thread, this task is not
tied to the current stack frame, and hence it cannot hold any
references other than those with
'static lifetime. If you want
to spawn a task that references stack data, use the
function to create a scope.
The behavior is essentially the same as the
function, except that calls from the same thread
will be prioritized in FIFO order. This is similar to the now-
breadth_first option, except the effect is isolated
spawn_fifo calls, not all threadpool tasks.
For more details on this design, see Rayon RFC #1.
If this closure should panic, the resulting panic will be
propagated to the panic handler registered in the
if any. See
ThreadPoolBuilder::panic_handler() for more