Hacker News new | ask | show | jobs
by BatmanAoD 952 days ago
That's...not...how threads or async work...?

> Blocking I/O executed on another thread, with a callback to execute when done, becomes async I/O (from the user's PoV).

That's not what we're talking about when we discuss languages with async I/O, though. That's just bog-standard synchronous I/O with multithreading.

> The read/write operations are still potentially blocking, so for efficiency you need multiple threads.

That doesn't actually follow. The entire point of language-level async I/O is to be able to continue doing other work while waiting for the kernel to finish an I/O operation, without spawning a new OS thread just for this purpose.