3 ms·
The only thing that's agreed upon and settled across OSs, is that reading from a regular file is always blocking, even with O_NONBLOCK. This means that you nei
by WhyNotHugo 2y ago
The only thing that's agreed upon and settled across OSs, is that reading from a regular file is always blocking, even with O_NONBLOCK.
This means that you neither epoll nor kqueue nor poll work if you ever need to read from a file.
I wish the BSDs and Linux and other platforms would align on non-blocking IO semantics. I just hope it's something new which can handle non-blocking IO with files too.
- p_ing 2y agoThis is not the case on NT. The OVERLAPPED data structure allows for async file operations. https://learn.microsoft.com/en-us/windows/win32/fileio/synchronous-and-asynchronous-i-o https://learn.microsoft.com/en-us/windows/win32/fileio/synch...