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

Comment by adzm

1 day 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  1 day 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  14 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