How do you use AIO and epoll together in a single

2019-02-05 02:07发布

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?

4条回答
唯我独甜
2楼-- · 2019-02-05 02:17

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)."

查看更多
萌系小妹纸
3楼-- · 2019-02-05 02:19

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

查看更多
姐就是有狂的资本
4楼-- · 2019-02-05 02:21

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

查看更多
再贱就再见
5楼-- · 2019-02-05 02:32

try libevent:

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

there are patches to support both.

查看更多
登录 后发表回答