Skip to content(if available)orjump to list(if available)

A Programmer-Friendly I/O Abstraction Over io_uring and kqueue

formerly_proven

> You can switch a file descriptor into non-blocking mode so the call won’t block while data you requested is not available. But system calls are still expensive, incurring context switches and cache misses. In fact, networks and disks have become so fast that these costs can start to approach the cost of doing the I/O itself. For the duration of time a file descriptor is unable to read or write, you don’t want to waste time continuously retrying read or write system calls.

O_NONBLOCK basically doesn't do anything for file-based file-descriptions - a file is always considered "ready" for I/O.