logoalt Hacker News

kibwenlast Friday at 10:05 PM1 replyview on HN

> Code runs to completion until it deterministically yields

No, because async can be (quote often is) used to perform I/O, whose time to completion does not need to be deterministic or predictable. Selecting on multiple tasks and proceeding with the one that completes first is an entirely ordinary feature of async programming. And even if you don't need to suffer the additional nondeterminism of your OS's thread scheduler, there's nothing about async that says you can't use threads as part of its implementation.


Replies

ajrosslast Friday at 10:55 PM

And I repeat, if you think effects from unpredictable I/O completion order constitute equivalent debugging thought landscapes to hardware-parallel races, I can only laugh.

Yes yes, in theory they're the same. That's the joke.

show 1 reply