What happens with the remaining events if the number of events exceeds the maxevents argument given to epoll_wait()?

StackOverflow https://stackoverflow.com/questions/15985250

Frage

Is epoll chivalrous enough to hold onto the remaining events, and put them into the events array the next time epoll_wait() is called? Or does it simply trash them like a total jerk?

The man page neglects to mention this.

War es hilfreich?

Lösung

Forgetting the events would be...extremely rude to the programmer. Anything based on edge-triggered epoll would stop working under load.

EDIT: I forgot to mention that epoll will not forget about events that it hasn't returned to user code, barring those cases where the underlying file has been closed.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top