3 ms·
async doesn't work if you need to do filesystem I/O. With POSIX, you can only really do blocking filesystem I/O. There's an API for async I/O, where readiness
by WhyNotHugo 1y ago
async doesn't work if you need to do filesystem I/O.
With POSIX, you can only really do blocking filesystem I/O. There's an API for async I/O, where readiness of any read/write operation can either deliver a signal, or start a new thread. Neither of these scale at all. Things like select, poll, epoll all block, even with O_NONBLOCK.
So if your application needs to read files which may be large, or on a slow filesystem (or even networked filesystems!), you're now working with blocking I/O, at which point async can't help you.
---
Obviously this isn't the root cause of "why hasn't async taken over". It's just one of the many reasons which all pile up.