Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by adzm

21 hours ago

I wish await in JavaScript could conditionally yield. Instead I end up having to use arounds like if (shouldYield()) await do yield();

2 comments

adzm

Reply

baxuz  21 hours ago

There's an RFC or two to spawn threads so I'm looking forward to that. The current way of workers + messages is tedious as hell.

silverwind  12 hours ago

Isn't that basically AsyncGenerator?

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities