top | item 42541950

(no title)

stevefolta | 1 year ago

> ...nobody really should be using either of them.

What's wrong with poll(), at least for smaller values of nfds? And what should one use instead when writing POSIX-compatible portable code, where epoll() and kqueue() don't exist?

discuss

order

somat|1 year ago

Fun fact, on openbsd(at least, I don't know about freebsd) select and poll were reworked to use kqueue internally.

The thread is an interesting read as it sounds like the naive approach has negative performance implications, knowing openbsd I suspect the main motivation was to reduce maintenance burden, that is, make it easier to reason about the internals of event driven mechanisms by only having one such system to worry about.

https://marc.info/?l=openbsd-tech&m=162444132017561&w=2