Skip to main content

map_splits

Function map_splits 

Source
pub fn map_splits<T, F>(splits: &[Split], f: F) -> Result<Vec<T>>
where T: Send, F: Fn(&Split) -> Result<T> + Sync + Send,
Expand description

Runs f on every split in parallel on the Rayon pool (the outer loop, as docs/architecture.md prescribes) and returns the results in split order: the first error in split order, if any fails. Each split’s work is independent and seeded on its own, so results do not depend on the number of threads.