Function simple_parallel::one_to_one::map [] [src]

pub fn map<'a, I: IntoIterator, F, T>(scope: &Scope<'a>, iter: I, f: F) -> ParMap<T> where I::Item: 'a + Send, F: 'a + Send + Sync + Fn(I::Item) -> T, T: Send + 'a

Execute f on iter, yielding the results in the order the correspond to in iter.

This is a drop-in replacement for iter.map(f), that runs in parallel, and eagerly consumes iter spawning a thread for each element.