Skip to content

Instantly share code, notes, and snippets.

@d6u
Last active November 18, 2015 18:22
Show Gist options
  • Select an option

  • Save d6u/9e8ae07269caf7980b6e to your computer and use it in GitHub Desktop.

Select an option

Save d6u/9e8ae07269caf7980b6e to your computer and use it in GitHub Desktop.
var funcA = Bluebird.coroutine(function *() {
while (true) {
yield someFunction();
}
});
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