Skip to content

Instantly share code, notes, and snippets.

@laser
Created June 1, 2015 21:28
Show Gist options
  • Select an option

  • Save laser/8b0418bdd60864819203 to your computer and use it in GitHub Desktop.

Select an option

Save laser/8b0418bdd60864819203 to your computer and use it in GitHub Desktop.
async.parallel({
'alpha': function(callback) {
window.setTimeout(function() {
callback(null, 0);
}, 1000);
},
'beta': function(callback) {
window.setTimeout(function() {
callback(null, 1, 2);
});
}
}, function(err, results) {
console.log(results.alpha) // 0
console.log(results.beta) // [1, 2]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment