Poll / Kqueue on Mac OS X
schmorp at schmorp.de
Mon Dec 15 22:13:34 CET 2008
On Mon, Dec 15, 2008 at 11:23:31AM +1300, Space Ship Traveller <space.ship.traveller at gmail.com> wrote:
> I haven't benchmarked kqueue. This wasn't really about benchmarking - it
> was more about scratching my particular itch. I don't expect to ever have
> a huge number of fds to query, so at this point it is a bit
Then using the select backend (or select) is likely to be faster anyways,
and certainly much more portable :)
select is usually faster than poll or other event mechanisms on most unix
systems, too, if you have few and low file descriptors.
> I was very confused about the original behavior of kqueue. I just
> expected it to work as you indicated.
Same here, that's why I lost so many words about it in the libev
documentation. It would be nice if apple at least admitted to it in their
documentation, i.e. "kqueue only works for sockets, poll too, and we give
a shit about fixing it" :)
> Nothing in the documentation indicates otherwise.
Yes, and that despite this being a well-known bug for years now.
> If you have all this energy, why not file a bug report.
I don't use apple, and my experience with bug reports is that apple
classifies them as non-public and forgets about them. Happened to all
bug reports I or other people filed about these kind of problems, which
includes more mundane bugs such as the broken-till-unusability i18n
support and so on.
Besides, it's not as if these bugs weren't well known by apple and had been
reported many item in the past by people.
It's kind of frustrating to file bugs just to see them disappear without
any indication of apple even trying to do something.
> I'm bringing the issue up further with other developers on the darwin
> mailing list. I'll end up filing a bug report when I have more
> information and can provide a good report to Apple.
Sure, but don't get frustrated if it gets blackholed, too - it's just how
apple treats customers and developers.
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / pcg at goof.com
More information about the libev