Function simple_parallel::both [] [src]

pub fn both<T, U, F>(x: T, y: T, f: F) -> (U, U) where T: Send, U: Send, F: Sync + Fn(T) -> U

Execute f on both x and y, in parallel, returning the result.

This is the same (including panic semantics) as (f(x), f(y)), up to ordering. It is designed to be used for divide-and-conquer algorithms.