Skip to content

Instantly share code, notes, and snippets.

@EduceHealth
Created June 7, 2014 00:22
Show Gist options
  • Save EduceHealth/9743e6a49bad5d3fead6 to your computer and use it in GitHub Desktop.
Save EduceHealth/9743e6a49bad5d3fead6 to your computer and use it in GitHub Desktop.
Parallel promises in an array
var aBunchOfThings = [];
for(thing in things){
aBunchOfThings.push(OtherThing.find());
}
Q.all(aBunchOfThings).then(function(otherthings){
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment