Last active
November 18, 2015 18:22
-
-
Save d6u/9e8ae07269caf7980b6e to your computer and use it in GitHub Desktop.
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 characters
| var funcA = Bluebird.coroutine(function *() { | |
| while (true) { | |
| yield someFunction(); | |
| } | |
| }); |
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 characters
| function main() { | |
| function doStuff() { | |
| asyncStuff(function () { | |
| if (true) { | |
| // Other stuff | |
| } else { | |
| // continue loop | |
| doStuff(); | |
| } | |
| }); | |
| } | |
| doStuff(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment