Explain the difference between blocking, non-blocking, and asynchronous I/O.
Last updated
Blocking I/O puts the calling thread to sleep until the operation completes.
Non-blocking I/O returns immediately (e.g.
EWOULDBLOCK) if not ready, so the caller retries using readiness tools likeselectorepoll.Asynchronous I/O has the kernel do the whole operation and notify on completion (e.g.
io_uring, POSIX aio), so the caller never waits or re-issues.