Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mapParallel and forEachParallel #1

Open
tracker1 opened this issue Jun 21, 2017 · 1 comment
Open

Add mapParallel and forEachParallel #1

tracker1 opened this issue Jun 21, 2017 · 1 comment

Comments

@tracker1
Copy link

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.
@toniov
Copy link
Owner

toniov commented Jun 21, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants