[Libevent-users] files and libevent
Chris Brody
chris.brody at gmail.com
Mon Jun 16 09:23:58 EDT 2008
On Mon, Jun 16, 2008 at 3:11 PM, Hannah Schroeter <hannah at schlund.de> wrote:
[...]
> On most OSes, however, checking for "readable" on plain files always
> immediately returns/yields a readable event anyway, so it's of no use
> (e.g. select/poll on Unix, I guess the same for epoll/kqueue, ok,
> kqueue differs from select/poll in that it returns readable if you're
> not at EOF, unless you set an additional flag, and then it returns in
> all cases). You have to use different mechanisms (like aio) if you want
> to hide disk latencies on plain files without using separate threads
> for their manipulation. So I think, using libevent events on plain files
> usually just doesn't make much sense in my eyes.
For good AIO, I suggest you take a look at:
http://software.schmorp.de/pkg/libeio.html
CB
More information about the Libevent-users
mailing list