Last active
July 10, 2018 12:42
-
-
Save getify/5959149 to your computer and use it in GitHub Desktop.
Revisions
-
getify revised this gist
Jun 3, 2015 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,10 @@ ASQ() .then( // these 3 run "in succession" function(done){ setTimeout(done,100); }, function(done){ setTimeout(done,200); }, function(done){ setTimeout(done,300); } ) .then(function(){ alert("All tasks are complete, and that took ~600ms!"); }); -
getify revised this gist
Aug 27, 2014 . 3 changed files with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ ASQ() .all( // or .gate(..) // these 3 run "in parallel" function(done){ setTimeout(done,100); }, function(done){ setTimeout(done,200); }, function(done){ setTimeout(done,300); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ ASQ() // these 3 run "in succession" .then(function(done){ setTimeout(done,100); }) .then(function(done){ setTimeout(done,200); }) .then(function(done){ setTimeout(done,300); }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ ASQ() .then(function(done){ setTimeout(done,100); }) .all( // or .gate(..) // these 2 run "in parallel" function(done){ setTimeout(done,200); }, function(done){ setTimeout(done,300); } ) -
getify revised this gist
Jul 9, 2013 . 2 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes. -
getify revised this gist
Jul 9, 2013 . 3 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes.File renamed without changes. -
getify created this gist
Jul 9, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ ASQ() .gate( function(done){ setTimeout(done,100); }, function(done){ setTimeout(done,200); }, function(done){ setTimeout(done,300); } ) .then(function(){ alert("All tasks are complete, and that only took ~300ms, not 600ms!"); }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ ASQ() .then(function(done){ setTimeout(done,100); }) .then(function(done){ setTimeout(done,200); }) .then(function(done){ setTimeout(done,300); }) .then(function(){ alert("All tasks are complete, and that took ~600ms!"); }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ ASQ() .then(function(done){ setTimeout(done,100); }) .gate( function(done){ setTimeout(done,200); }, function(done){ setTimeout(done,300); } ) .then(function(){ alert("All tasks are complete, and that took ~400ms!"); });