p-iteration
p-iteration copied to clipboard
Add mapParallel and forEachParallel
Would be nice to see a forEach that allowed for parallel execution..
-
mapParallel(array, options, callback, [thisArg])
-
forEachParallel(array, options, callback, [thisArg])
options
- concurrency: number, min: 1, max: ????
- The number of in-flight/unresolved concurrent operations to start.
map
and forEach
are already run concurrently.
Certainly a concurrency parameter would be nice, but I want to keep the main methods with the same API as the original ES5 ones.
Adding forEachLimit
, mapLimit
, etc. could be the way to go. Similar to the async library xxxLimit
methods.