Last active
September 19, 2023 11:07
-
-
Save cowboyd/ba44a1e5a003fd2c13b7a6137c7d43de to your computer and use it in GitHub Desktop.
Austin JS Structured Concurrency Talk, code samples
This file contains 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
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