Skip to content

Instantly share code, notes, and snippets.

@mikeric
Created November 19, 2013 02:00
Show Gist options
  • Save mikeric/7538993 to your computer and use it in GitHub Desktop.
Save mikeric/7538993 to your computer and use it in GitHub Desktop.
# synchronous ajax calls (one at a time, then
# start the next one, etc. then do something)
sessions.fetch success ->
rooms.fetch success ->
do_something
# async ajax calls (all at the same time, then
# do something when all are finished)
$.when(sessions.fetch(), rooms.fetch()).then ->
do_something
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment