Skip to content
New issue

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

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

Already on GitHub? # to your account

Add concurrency argument to async.auto #637

Merged
merged 1 commit into from
Oct 26, 2015

Conversation

vergenzt
Copy link
Contributor

Adds an argument to async.auto to specify maximum concurrency with which to run tasks.

Fixes #635.

@vergenzt
Copy link
Contributor Author

The Travis build failed because of someone else's non-deterministic test! :( Mine (auto concurrency) passes...

...
✔ auto
✔ auto concurrency
✔ auto petrify
...
✖ queue pause with concurrency
AssertionError:
[ 'process 1',
  'timeout 0',
  'process 2',
  'timeout 0',
  'process 3',
  'timeout 400',
  'process 4',
  'timeout 400',
  'process 5',
  'timeout 500',
  'process 6',
  'timeout 500' ]
deepEqual
[ 'process 1',
  'timeout 100',
  'process 2',
  'timeout 100',
  'process 3',
  'timeout 400',
  'process 4',
  'timeout 400',
  'process 5',
  'timeout 500',
  'process 6',
  'timeout 500' ]
    at Object.same (/home/travis/build/caolan/async/node_modules/nodeunit/lib/types.js:83:39)
    at null._onTimeout (/home/travis/build/caolan/async/test/test-async.js:2570:14)
    at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

@vergenzt
Copy link
Contributor Author

(FYI I amended the commit (only changed the timestamp) to force a Travis rebuild.)

@cryptoquick
Copy link

👍

@vergenzt
Copy link
Contributor Author

Bump. :)

@cryptoquick
Copy link

It would be nice to get back to using mainline async again. I'm still on your fork, @vergenzt
Bump 😄

@aearly
Copy link
Collaborator

aearly commented Oct 25, 2015

If you can fix the conflicts, I'll merge this.

@vergenzt vergenzt force-pushed the auto-concurrency branch 3 times, most recently from ad61fa3 to 5656a11 Compare October 25, 2015 15:14
@vergenzt
Copy link
Contributor Author

@aearly Done, rebased to master. Let me know if you need anything else!

aearly added a commit that referenced this pull request Oct 26, 2015
Add concurrency argument to async.auto
@aearly aearly merged commit fbeab9b into caolan:master Oct 26, 2015
aearly added a commit that referenced this pull request Oct 26, 2015
@aearly
Copy link
Collaborator

aearly commented Oct 26, 2015

Thanks! I swapped the concurrency arg's position to always have the callback as the last arg.

@cryptoquick
Copy link

Awesome! 😸

@vergenzt
Copy link
Contributor Author

Sweet. Thanks for merging. :-)

@aearly aearly added this to the 2.0 milestone Mar 11, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit number of concurrent tasks in async.auto
3 participants