Permalink
Browse files

call next function in waterfall asynchronously

  • Loading branch information...
1 parent 99ffdb9 commit 6470518623188c42eafdbc9d1a1b1fa674a9cb6c @caolan committed May 16, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/async.js
View
@@ -58,7 +58,7 @@ exports.waterfall = function(arr){
if(i < arr.length-1){
args = args.concat(arguments.callee)
}
- arr[i].apply(null, args);
+ process.nextTick(function(){arr[i].apply(null, args);});
}
})();
};

0 comments on commit 6470518

Please sign in to comment.