Skip to content

Commit

Permalink
Merge pull request #904 from caolan/setImm
Browse files Browse the repository at this point in the history
Use setImmediate consistently over nextTick
  • Loading branch information
megawac committed Sep 25, 2015
2 parents 0399fe2 + c1de163 commit 22e89cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
return callback(null);
} else {
if (sync) {
async.nextTick(iterate);
async.setImmediate(iterate);
} else {
iterate();
}
Expand Down Expand Up @@ -1048,7 +1048,7 @@
var callback = args.pop();
var key = hasher.apply(null, args);
if (key in memo) {
async.nextTick(function () {
async.setImmediate(function () {
callback.apply(null, memo[key]);
});
}
Expand Down

0 comments on commit 22e89cb

Please sign in to comment.