views:

595

answers:

3

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?

+2  A: 

try libevent:

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

there are patches to support both.

Ass3mbler
The new libeevent 2.0 is going completion-based: http://google-opensource.blogspot.com/2010/01/libevent-20x-like-libevent-14x-only.html - hopefully AIO will turn up as a backend so you can mix file and network descriptórs
Will
A: 

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

jcaose
+1  A: 

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

ury