Is epoll thread-safe?

╄→гoц情女王★ 提交于 2019-11-29 20:56:12

It is thread-safe, but there isn't much documentation that explicitly states that - see http://linux.derkeiler.com/Mailing-Lists/Kernel/2006-03/msg00084.html

BTW, you can also have multiple threads waiting on a single epoll_fd, but in that case it can get a bit tricky (i.e. you might want to use edge-triggered (EPOLLET) or oneshot mode (EPOLLONESHOT) - see http://linux.die.net/man/2/epoll_ctl)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!