Hannah Schroeter <[EMAIL PROTECTED]> wrote:
Hello!
On Mon, Nov 28, 2005 at 07:34:37PM +0000, Alex Stapleton wrote:
>[...]
>You can use inotify to give you an event when a file changes.
>http://kerneltrap.org/node/3847
>There is even a perl module in cpan for working with it. Surely this
>is not too far off what you want?
>I can make no comparison in terms of system overheads between using
>workers and inotify though.
inotify isn't for asynchronous I/O but for change notification. As
someone else said, orthogonal issues.
>And er, you can do non-blocking I/O on files. You will get EOF when
>you reach the end of the file, and once more data comes in you will
>receive it. Obviously this means spinning around on read() calls
>though which isn't really that nice a thing to do.
But read/write doesn't ever block in the sense of
select/poll/epoll/kqueue. So registering read or write events with
libevent just doesn't make sense for plain files.Can you please elaborate why the libevent doesn't make sense for a plain files, don't you want to monitor the condition of the files if it changes, or someone wrote into it, or error occurred with the file. You dont want to keep on polling or reading each file handle.Thanks a lot in advance !!--Aleks
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
_______________________________________________ Libevent-users mailing list [email protected] http://monkey.org/mailman/listinfo/libevent-users
