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

Comparing libev/ev.pod (file contents):
Revision 1.313 by root, Fri Oct 22 05:44:33 2010 UTC vs.
Revision 1.315 by root, Fri Oct 22 09:33:14 2010 UTC

4531=head3 C<kqueue> is buggy 4531=head3 C<kqueue> is buggy
4532 4532
4533The kqueue syscall is broken in all known versions - most versions support 4533The kqueue syscall is broken in all known versions - most versions support
4534only sockets, many support pipes. 4534only sockets, many support pipes.
4535 4535
4536Libev tries to work around this by not using C<kqueue> by default on 4536Libev tries to work around this by not using C<kqueue> by default on this
4537this rotten platform, but of course you can still ask for it when creating 4537rotten platform, but of course you can still ask for it when creating a
4538a loop. 4538loop - embedding a socket-only kqueue loop into a select-based one is
4539probably going to work well.
4539 4540
4540=head3 C<poll> is buggy 4541=head3 C<poll> is buggy
4541 4542
4542Instead of fixing C<kqueue>, Apple replaced their (working) C<poll> 4543Instead of fixing C<kqueue>, Apple replaced their (working) C<poll>
4543implementation by something calling C<kqueue> internally around the 10.5.6 4544implementation by something calling C<kqueue> internally around the 10.5.6
4562 4563
4563=head3 C<errno> reentrancy 4564=head3 C<errno> reentrancy
4564 4565
4565The default compile environment on Solaris is unfortunately so 4566The default compile environment on Solaris is unfortunately so
4566thread-unsafe that you can't even use components/libraries compiled 4567thread-unsafe that you can't even use components/libraries compiled
4567without C<-D_REENTRANT> (as long as they use C<errno>), which, of course, 4568without C<-D_REENTRANT> in a threaded program, which, of course, isn't
4568isn't defined by default. 4569defined by default. A valid, if stupid, implementation choice.
4569 4570
4570If you want to use libev in threaded environments you have to make sure 4571If you want to use libev in threaded environments you have to make sure
4571it's compiled with C<_REENTRANT> defined. 4572it's compiled with C<_REENTRANT> defined.
4572 4573
4573=head3 Event port backend 4574=head3 Event port backend
4574 4575
4575The scalable event interface for Solaris is called "event ports". Unfortunately, 4576The scalable event interface for Solaris is called "event
4576this mechanism is very buggy. If you run into high CPU usage, your program 4577ports". Unfortunately, this mechanism is very buggy in all major
4578releases. If you run into high CPU usage, your program freezes or you get
4577freezes or you get a large number of spurious wakeups, make sure you have 4579a large number of spurious wakeups, make sure you have all the relevant
4578all the relevant and latest kernel patches applied. No, I don't know which 4580and latest kernel patches applied. No, I don't know which ones, but there
4579ones, but there are multiple ones. 4581are multiple ones to apply, and afterwards, event ports actually work
4582great.
4580 4583
4581If you can't get it to work, you can try running the program by setting 4584If you can't get it to work, you can try running the program by setting
4582the environment variable C<LIBEV_FLAGS=3> to only allow C<poll> and 4585the environment variable C<LIBEV_FLAGS=3> to only allow C<poll> and
4583C<select> backends. 4586C<select> backends.
4584 4587
4585=head2 AIX POLL BUG 4588=head2 AIX POLL BUG
4586 4589
4587AIX unfortunately has a broken C<poll.h> header. Libev works around 4590AIX unfortunately has a broken C<poll.h> header. Libev works around
4588this by trying to avoid the poll backend altogether (i.e. it's not even 4591this by trying to avoid the poll backend altogether (i.e. it's not even
4589compiled in), which normally isn't a big problem as C<select> works fine 4592compiled in), which normally isn't a big problem as C<select> works fine
4590with large bitsets, and AIX is dead anyway. 4593with large bitsets on AIX, and AIX is dead anyway.
4591 4594
4592=head2 WIN32 PLATFORM LIMITATIONS AND WORKAROUNDS 4595=head2 WIN32 PLATFORM LIMITATIONS AND WORKAROUNDS
4593 4596
4594=head3 General issues 4597=head3 General issues
4595 4598
4872 4875
4873=over 4 4876=over 4
4874 4877
4875=item active 4878=item active
4876 4879
4877A watcher is active as long as it has been started (has been attached to 4880A watcher is active as long as it has been started and not yet stopped.
4878an event loop) but not yet stopped (disassociated from the event loop). 4881See L<WATCHER STATES> for details.
4879 4882
4880=item application 4883=item application
4881 4884
4882In this document, an application is whatever is using libev. 4885In this document, an application is whatever is using libev.
4883 4886
4885 4888
4886The address of a function that is called when some event has been 4889The address of a function that is called when some event has been
4887detected. Callbacks are being passed the event loop, the watcher that 4890detected. Callbacks are being passed the event loop, the watcher that
4888received the event, and the actual event bitset. 4891received the event, and the actual event bitset.
4889 4892
4890=item callback invocation 4893=item callback/watcher invocation
4891 4894
4892The act of calling the callback associated with a watcher. 4895The act of calling the callback associated with a watcher.
4893 4896
4894=item event 4897=item event
4895 4898
4914The model used to describe how an event loop handles and processes 4917The model used to describe how an event loop handles and processes
4915watchers and events. 4918watchers and events.
4916 4919
4917=item pending 4920=item pending
4918 4921
4919A watcher is pending as soon as the corresponding event has been detected, 4922A watcher is pending as soon as the corresponding event has been
4920and stops being pending as soon as the watcher will be invoked or its 4923detected. See L<WATCHER STATES> for details.
4921pending status is explicitly cleared by the application.
4922
4923A watcher can be pending, but not active. Stopping a watcher also clears
4924its pending status.
4925 4924
4926=item real time 4925=item real time
4927 4926
4928The physical time that is observed. It is apparently strictly monotonic :) 4927The physical time that is observed. It is apparently strictly monotonic :)
4929 4928
4936=item watcher 4935=item watcher
4937 4936
4938A data structure that describes interest in certain events. Watchers need 4937A data structure that describes interest in certain events. Watchers need
4939to be started (attached to an event loop) before they can receive events. 4938to be started (attached to an event loop) before they can receive events.
4940 4939
4941=item watcher invocation
4942
4943The act of calling the callback associated with a watcher.
4944
4945=back 4940=back
4946 4941
4947=head1 AUTHOR 4942=head1 AUTHOR
4948 4943
4949Marc Lehmann <libev@schmorp.de>, with repeated corrections by Mikael Magnusson. 4944Marc Lehmann <libev@schmorp.de>, with repeated corrections by Mikael Magnusson.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines