devela::_dep::rayon

Function broadcast

pub fn broadcast<OP, R>(op: OP) -> Vec<R> 
where OP: Fn(BroadcastContext<'_>) -> R + Sync, R: Send,
Available on crate feature dep_rayon only.
Expand description

Executes op within every thread in the current threadpool. If this is called from a non-Rayon thread, it will execute in the global threadpool. Any attempts to use join, scope, or parallel iterators will then operate within that threadpool. When the call has completed on each thread, returns a vector containing all of their return values.

For more information, see the ThreadPool::broadcast() method.