Skip to content

Instantly share code, notes, and snippets.

@darkwing
Created January 19, 2022 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkwing/8471b46ff768d5cec4571ab5b8eeb278 to your computer and use it in GitHub Desktop.
Save darkwing/8471b46ff768d5cec4571ab5b8eeb278 to your computer and use it in GitHub Desktop.
setInterval(async () => {
const result = await someAsyncFunc();
// The problem is that `someAsyncFunc` could hang during one of the loops,
// which would allow multiple active awaits
}, 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment