On Sat, Apr 19, 2008 at 11:43:20AM +0200, Jonathan Schleifer wrote:
As usual, depends what you want to do.
poll() and select() give you control over file descriptors. kqueue
encompasses more events. It's not especially faster, it just leads to
simpler code in case you need the supplementary events.
If all you need to do is watch over a set of file descriptors, poll
and select are the simplest ones to use... and the most portable.
In many, many cases, poll() is better. The only case where select comes
close is when you want to watch over most of your file descriptors (because
you access less memory in such a case).
And then, you should profile. I'm not even sure it makes a difference.
Most of the places in the system where we have select() are legacies: it
it's not broken, don't fix it.
| Linus Torvalds | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Mike Galbraith | Re: regression: CD burning (k3b) went broke |
| Con Kolivas | Re: -mm merge plans for 2.6.23 |
git: | |
| Gerrit Renker | [PATCH 24/37] dccp: Processing Confirm options |
| Linus Torvalds | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Woodhouse | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
