Skip to content

Instantly share code, notes, and snippets.

@cowboyd
Last active September 19, 2023 11:07
Show Gist options
  • Save cowboyd/ba44a1e5a003fd2c13b7a6137c7d43de to your computer and use it in GitHub Desktop.
Save cowboyd/ba44a1e5a003fd2c13b7a6137c7d43de to your computer and use it in GitHub Desktop.
Austin JS Structured Concurrency Talk, code samples
async function sleep(duration) {
await new Promise(resolve => setTimeout(resolve, duration));
}
async function main() {
await sleep(1000);
}
await main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment