Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
adzm
· 2mo ago · 0 comments
I wish await in JavaScript could conditionally yield. Instead I end up having to use arounds like if (shouldYield()) await do yield();
Comments
[–]
baxuz
2mo 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
2mo ago
Isn't that basically AsyncGenerator?
[–]
adzm
OP
2mo ago
Not really, that still yields on every invocation