简体   繁体   English

如果事件数超过epoll_wait()的maxevents参数,剩余事件会发生什么?

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

Is epoll chivalrous enough to hold onto the remaining events, and put them into the events array the next time epoll_wait() is called? epoll是否足以保留其余事件,并在下次调用epoll_wait()时将它们放入事件数组中? Or does it simply trash them like a total jerk? 或者它只是像一个混蛋一样把它们丢弃?

The man page neglects to mention this. 该手册忽略了这一点。

Forgetting the events would be...extremely rude to the programmer. 忘记这些事件对于程序员来说是非常粗鲁的。 Anything based on edge-triggered epoll would stop working under load. 任何基于边缘触发的epoll的东西都会在负载下停止工作。

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. 编辑 :我忘了提及epoll不会忘记它没有返回到用户代码的事件,除非底层文件已被关闭的情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM