parallel_chunks

Function parallel_chunks 

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

Process chunks of work in parallel

§Arguments

  • items - Items to process
  • chunksize - Size of each chunk
  • f - Function to apply to each chunk

§Returns

  • Vector of results from each chunk