0

In the epoll_wait man page, we see the following in Notes:

If more than maxevents file descriptors are ready when epoll_wait() is called, then successive epoll_wait() calls will round robin through the set of ready file descriptors. This behavior helps avoid starvation scenarios, where a process fails to notice that additional file descriptors are ready because it focuses on a set of file descriptors that are already known to be ready.

When I look at the kevent man page, there's nothing similar about what happens if nevents is smaller than the number of ready events.

Are there any anti-starvation guarantees for kevent, or do I have to keep increasing nevents if I observe the same file descriptors over and over again to prevent starvation?

merlin2011
  • 71,677
  • 44
  • 195
  • 329

0 Answers0