[Pkg-javascript-commits] [node-async] 408/480: Bugfix: sending saturated event should respect current concurrency.
Jonas Smedegaard
js at moszumanska.debian.org
Fri May 2 08:58:47 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-async.
commit fb8a0ed14fedd36e3e2e47b4f950cd5259f02f81
Author: Ryan Shaw <ryanshaw at unc.edu>
Date: Sat Apr 7 17:19:10 2012 -0400
Bugfix: sending saturated event should respect current concurrency.
---
lib/async.js | 2 +-
test/test-async.js | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/async.js b/lib/async.js
index 04f7246..312e645 100755
--- a/lib/async.js
+++ b/lib/async.js
@@ -709,7 +709,7 @@
q.tasks.push(item);
}
- if (q.saturated && q.tasks.length === concurrency) {
+ if (q.saturated && q.tasks.length === q.concurrency) {
q.saturated();
}
async.setImmediate(q.process);
diff --git a/test/test-async.js b/test/test-async.js
index fdcac5f..518650f 100755
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -2664,7 +2664,8 @@ exports['queue events'] = function(test) {
// nop
calls.push('process ' + task);
async.setImmediate(cb);
- }, 3);
+ }, 10);
+ q.concurrency = 3;
q.saturated = function() {
test.ok(q.length() == 3, 'queue should be saturated now');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git
More information about the Pkg-javascript-commits
mailing list