parallel_enumerate

Function parallel_enumerate 

Source
pub fn parallel_enumerate<T, R, F>(items: &[T], f: F) -> Vec<R>
where T: Send + Sync, R: Send, F: Fn(usize, &T) -> R + Send + Sync,
Expand description

Process items in parallel with index information

§Arguments

  • items - Items to process
  • f - Function to apply to each (index, item) pair

§Returns

  • Vector of results