Skip to main content

map_ordered

Function map_ordered 

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

Applies operation to every item with at most workers threads and returns results in item order, so callers observe the same sequence for every worker count.