Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bugfix: sending saturated event should respect current concurrency #120

Closed
wants to merge 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +1 −1  lib/async.js
  2. +2 −1  test/test-async.js
View
2  lib/async.js
@@ -594,7 +594,7 @@
data: task,
callback: typeof callback === 'function' ? callback : null
});
- if (q.saturated && q.tasks.length == concurrency) {
+ if (q.saturated && q.tasks.length == q.concurrency) {
q.saturated();
}
async.nextTick(q.process);
View
3  test/test-async.js
@@ -1563,7 +1563,8 @@ exports['queue events'] = function(test) {
// nop
calls.push('process ' + task);
cb();
- }, 3);
+ }, 10);
+ q.concurrency = 3;
q.saturated = function() {
test.ok(q.length() == 3, 'queue should be saturated now');
Something went wrong with that request. Please try again.