How do you use AIO and epoll together in a single event loop?

吃可爱长大的小学妹 提交于 2019-11-29 08:52:57

问题


How can you combine AIO and epoll together in a single event loop?

Google finds lots of talk from 2002 and 2003 about unifying them, but its unclear if anything happened, or if it's possible.

Has anyone rolled-their-own with an epoll loop using eventfd for the aio signal?


回答1:


try libevent:

http://www.monkey.org/~provos/libevent/

there are patches to support both.




回答2:


you can see http://www.xmailserver.org/eventfd-aio-test.c for a sample of aio and eventfd




回答3:


Tried eventfd with epoll?

"A key point about an eventfd file descriptor is that it can be monitored just like any other file descriptor using select(2), poll(2), or epoll(7)."




回答4:


FreeBSD supports AIO together with Kqueue, the AIO completion can be monitored by the Kqueue interface.



来源:https://stackoverflow.com/questions/1825621/how-do-you-use-aio-and-epoll-together-in-a-single-event-loop

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