ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.303 by root, Thu Oct 14 04:29:34 2010 UTC vs.
Revision 1.305 by root, Thu Oct 14 05:07:04 2010 UTC

4423=head3 C<kqueue> is buggy 4423=head3 C<kqueue> is buggy
4424 4424
4425The kqueue syscall is broken in all known versions - most versions support 4425The kqueue syscall is broken in all known versions - most versions support
4426only sockets, many support pipes. 4426only sockets, many support pipes.
4427 4427
4428Libev tries to work around this by not using C<kqueue> by default on
4429this rotten platform, but of course you can still ask for it when creating
4430a loop.
4431
4428=head3 C<poll> is buggy 4432=head3 C<poll> is buggy
4429 4433
4430Instead of fixing C<kqueue>, Apple replaced their (working) C<poll> 4434Instead of fixing C<kqueue>, Apple replaced their (working) C<poll>
4431implementation by something calling C<kqueue> internally around the 10.5.6 4435implementation by something calling C<kqueue> internally around the 10.5.6
4432release, so now C<kqueue> I<and> C<poll> are broken. 4436release, so now C<kqueue> I<and> C<poll> are broken.
4433 4437
4434Libev tries to work around this by neither using C<kqueue> nor C<poll> by 4438Libev tries to work around this by not using C<poll> by default on
4435default on this rotten platform, but of course you cna still ask for them 4439this rotten platform, but of course you can still ask for it when creating
4436when creating a loop. 4440a loop.
4437 4441
4438=head3 C<select> is buggy 4442=head3 C<select> is buggy
4439 4443
4440All that's left is C<select>, and of course Apple found a way to fuck this 4444All that's left is C<select>, and of course Apple found a way to fuck this
4441one up as well: On OS/X, C<select> actively limits the number of file 4445one up as well: On OS/X, C<select> actively limits the number of file
4442descriptors you can pass in to 1024 - your program suddenyl crashes when 4446descriptors you can pass in to 1024 - your program suddenly crashes when
4443you use more. 4447you use more.
4444 4448
4445There is an undocumented "workaround" for this - defining 4449There is an undocumented "workaround" for this - defining
4446C<_DARWIN_UNLIMITED_SELECT>, which libev tries to use, so select I<should> 4450C<_DARWIN_UNLIMITED_SELECT>, which libev tries to use, so select I<should>
4447work on OS/X. 4451work on OS/X.
4464this mechanism is very buggy. If you run into high CPU usage, your program 4468this mechanism is very buggy. If you run into high CPU usage, your program
4465freezes or you get a large number of spurious wakeups, make sure you have 4469freezes or you get a large number of spurious wakeups, make sure you have
4466all the relevant and latest kernel patches applied. No, I don't know which 4470all the relevant and latest kernel patches applied. No, I don't know which
4467ones, but there are multiple ones. 4471ones, but there are multiple ones.
4468 4472
4469If you can't get it to work, you can try running the program with 4473If you can't get it to work, you can try running the program by setting
4470C<LIBEV_FLAGS=3> to only allow C<poll> and C<select> backends. 4474the environment variable C<LIBEV_FLAGS=3> to only allow C<poll> and
4475C<select> backends.
4471 4476
4472=head2 AIX POLL BUG 4477=head2 AIX POLL BUG
4473 4478
4474AIX unfortunately has a broken C<poll.h> header. Libev works around 4479AIX unfortunately has a broken C<poll.h> header. Libev works around
4475this by trying to avoid the poll backend altogether (i.e. it's not even 4480this by trying to avoid the poll backend altogether (i.e. it's not even

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines