Skip to content

Instantly share code, notes, and snippets.

@juliandescottes
Created January 26, 2016 18:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliandescottes/a0dca6670dc6388df3cb to your computer and use it in GitHub Desktop.
Save juliandescottes/a0dca6670dc6388df3cb to your computer and use it in GitHub Desktop.
function* testYield() {
console.log("#1");
yield new Promise(r => setTimeout(r, 2000));
console.log("#2");
yield new Promise(r => setTimeout(r, 2000));
console.log("#3");
return;
}
function* spawnTest() {
yield testYield();
console.log("#4");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment