Skip to main content

try_distributed_map

Function try_distributed_map 

Source
pub fn try_distributed_map<T, R, F>(
    data: Vec<T>,
    map_fn: F,
    n_workers: usize,
) -> CoreResult<Vec<R>>
where T: Send + 'static, R: Send + 'static, F: Fn(T) -> R + Send + Clone + 'static,
Expand description

Like distributed_map but returns CoreResult<Vec<R>>.

This wrapper always succeeds unless n_workers == 0 (which is silently clamped to 1); it exists for consistent error-handling at call sites.