From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: I/O event notification mechanism - select() or epoll() ?
Date: Fri, 28 Sep 2012 19:05:55 +0200 [thread overview]
Message-ID: <20120928170555.GA2820@debian.debian> (raw)
In-Reply-To: <CA+NV+Vm67XNLrjLjzEF6jz6oqOp=PtRZQb7nFuBJ2Vk3Mvy3Fg@mail.gmail.com>
On Wed, Sep 26, 2012 at 05:19:50PM +0530, Rahul Bedarkar wrote:
> Hi,
>
> I have to capture kernel udev events through libudev. One of API
> provides asynchronous events by reading on file descriptor. I found
> that there two ways to do that.
>
> 1) select call
> 2) epoll
>
> I also found that epoll is smarter and meant to replace old select call.
>
> What are your thoughts on these ? Which one is better ?
I personally prefer event loop libraries such as libev[1]. They handle
all the interfacing with the event mechanism the OS provides, so you
only need to register a callback function.
HTH,
Jonathan Neusch?fer
[1] http://software.schmorp.de/pkg/libev.html
prev parent reply other threads:[~2012-09-28 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 11:49 I/O event notification mechanism - select() or epoll() ? Rahul Bedarkar
2012-09-26 15:49 ` Peter Teoh
2012-09-28 5:23 ` michi1 at michaelblizek.twilightparadox.com
2012-09-28 5:28 ` Rahul Bedarkar
2012-09-28 17:05 ` Jonathan Neuschäfer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120928170555.GA2820@debian.debian \
--to=j.neuschaefer@gmx.net \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).