Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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


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.


Isn't that basically AsyncGenerator?

Not really, that still yields on every invocation



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: