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

Comparing libev/ev.pod (file contents):
Revision 1.71 by root, Fri Dec 7 20:13:09 2007 UTC vs.
Revision 1.73 by root, Sat Dec 8 03:53:36 2007 UTC

736=item bool ev_is_pending (ev_TYPE *watcher) 736=item bool ev_is_pending (ev_TYPE *watcher)
737 737
738Returns a true value iff the watcher is pending, (i.e. it has outstanding 738Returns a true value iff the watcher is pending, (i.e. it has outstanding
739events but its callback has not yet been invoked). As long as a watcher 739events but its callback has not yet been invoked). As long as a watcher
740is pending (but not active) you must not call an init function on it (but 740is pending (but not active) you must not call an init function on it (but
741C<ev_TYPE_set> is safe) and you must make sure the watcher is available to 741C<ev_TYPE_set> is safe), you must not change its priority, and you must
742libev (e.g. you cnanot C<free ()> it). 742make sure the watcher is available to libev (e.g. you cannot C<free ()>
743it).
743 744
744=item callback ev_cb (ev_TYPE *watcher) 745=item callback ev_cb (ev_TYPE *watcher)
745 746
746Returns the callback currently set on the watcher. 747Returns the callback currently set on the watcher.
747 748
765example, to reduce latency after idling, or more often, to bind two 766example, to reduce latency after idling, or more often, to bind two
766watchers on the same event and make sure one is called first. 767watchers on the same event and make sure one is called first.
767 768
768If you need to suppress invocation when higher priority events are pending 769If you need to suppress invocation when higher priority events are pending
769you need to look at C<ev_idle> watchers, which provide this functionality. 770you need to look at C<ev_idle> watchers, which provide this functionality.
771
772You I<must not> change the priority of a watcher as long as it is active or
773pending.
770 774
771The default priority used by watchers when no priority has been set is 775The default priority used by watchers when no priority has been set is
772always C<0>, which is supposed to not be too high and not be too low :). 776always C<0>, which is supposed to not be too high and not be too low :).
773 777
774Setting a priority outside the range of C<EV_MINPRI> to C<EV_MAXPRI> is 778Setting a priority outside the range of C<EV_MINPRI> to C<EV_MAXPRI> is
1749This automatically includes F<ev.h> and puts all of its definitions (many 1753This automatically includes F<ev.h> and puts all of its definitions (many
1750of them macros) into the global namespace. All C++ specific things are 1754of them macros) into the global namespace. All C++ specific things are
1751put into the C<ev> namespace. It should support all the same embedding 1755put into the C<ev> namespace. It should support all the same embedding
1752options as F<ev.h>, most notably C<EV_MULTIPLICITY>. 1756options as F<ev.h>, most notably C<EV_MULTIPLICITY>.
1753 1757
1754Care has been taken to keep the overhead low. The only data member added 1758Care has been taken to keep the overhead low. The only data member the C++
1755to the C-style watchers is the event loop the watcher is associated with 1759classes add (compared to plain C-style watchers) is the event loop pointer
1756(or no additional members at all if you disable C<EV_MULTIPLICITY> when 1760that the watcher is associated with (or no additional members at all if
1757embedding libev). 1761you disable C<EV_MULTIPLICITY> when embedding libev).
1758 1762
1759Currently, functions and static and non-static member functions can be 1763Currently, functions, and static and non-static member functions can be
1760used as callbacks. Other types should be easy to add as long as they only 1764used as callbacks. Other types should be easy to add as long as they only
1761need one additional pointer for context. If you need support for other 1765need one additional pointer for context. If you need support for other
1762types of functors please contact the author (preferably after implementing 1766types of functors please contact the author (preferably after implementing
1763it). 1767it).
1764 1768

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines