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

Really importantly, the behavior of poll/select/epoll on files is to always return "available." But a read from that file may still sleep waiting on disk — available does not mean the result is already in memory. They're only really effective primitives for networking sockets and artificial fds like signalfd().

Prior to io_uring, libraries that provide async file access in userspace (by necessity) use some kind of threadpool, with each thread processing an operation synchronously and providing an async result via self-pipe or other user-driven event.



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

Search: