Alternative I/O models
What’s epoll? - Julia Evans
What’s
O_NONBLOCK
? - Blocking I/O, Nonblocking I/O, And Epoll
- select / poll / epoll: practical difference for system architects
- No new code should be using select()
- In the vast majority of cases you would be choosing between poll and epoll/libevent.
- To use epoll, much more preparation is needed.
- select carries quite a few design flaws which make it undesirable as a polling mechanism in the modern networking application… is there is any reason to use select at all?
- The first reason is portability.
- select can - theoretically - handle the timeouts withing the one nanosecond precision, while both poll and epoll can only handle the one millisecond precision.
- Using select(2) - Use libev, Boost.Asio or other libraries.
- libev - A full-featured and high-performance event loop that is loosely modelled after libevent.
see also
Written on March 26, 2021, Last update on November 21, 2024
linux
io-stream
file
socket
event
network