Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created May 4, 2012 01:53
Show Gist options
  • Select an option

  • Save ccapndave/2591228 to your computer and use it in GitHub Desktop.

Select an option

Save ccapndave/2591228 to your computer and use it in GitHub Desktop.
deferreds = []
for torch in results
dfd = new $.Deferred()
do (dfd) ->
torch.populateUsers (populatedTorch) ->
dfd.resolve()
deferreds.push dfd.promise()
$.when.apply(null, deferreds).done ->
console.log 'DONE THANKS TO EVILTWIN!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment