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

4

9

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?

Igniter answered 1/12, 2009 at 11:38 Comment(2)
Realise this is very old question, but you could use 'signalfd' for the signal from aioMadura
Are you referring to POSIX AIO or Linux AIO? The latter allows to register an eventfd for completion notifications. And that eventfd you could add to your epoll fd set.Arel
H
5

try libevent:

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

there are patches to support both.

Harsh answered 1/12, 2009 at 11:51 Comment(1)
The new libeevent 2.0 is going completion-based: google-opensource.blogspot.com/2010/01/… - hopefully AIO will turn up as a backend so you can mix file and network descriptórsIgniter
A
3

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

Airboat answered 4/2, 2010 at 7:40 Comment(1)
Interestingly, according to oxnz.github.io/2016/10/13/linux-aio now there is #include <linux/aio_abi.h> so there's no need to resort to __NR_io_setupTowline
K
1

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

Kirkwood answered 1/12, 2009 at 11:38 Comment(0)
K
0

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

Kyle answered 24/1, 2013 at 8:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.