Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 644
Will Avatar asked Dec 01 '09 11:12

Will


3 Answers

try libevent:

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

there are patches to support both.

like image 189
Ass3mbler Avatar answered Nov 04 '22 15:11

Ass3mbler


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

like image 38
ury Avatar answered Nov 04 '22 15:11

ury


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

like image 30
jcaose Avatar answered Nov 04 '22 13:11

jcaose