Skip to content
Browse files

Fix use `process.nextTick`

  • Loading branch information...
1 parent 4dd0464 commit 50b239404d98853cf11677cb22c6e35690fe178d @hokaccha committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/chain-tiny.js
View
4 lib/chain-tiny.js
@@ -211,7 +211,7 @@ Chain.prototype.parallel = function(obj) {
var keys = Object.keys(obj);
keys.forEach(function(key) {
var fn = obj[key];
- setTimeout(function() {
+ process.nextTick(function() {
fn.call(null, function _next(err, result) {
if (err) {
next(err);
@@ -224,7 +224,7 @@ Chain.prototype.parallel = function(obj) {
}
}
});
- }, 0);
+ });
});
});
};

0 comments on commit 50b2394

Please sign in to comment.
Something went wrong with that request. Please try again.