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

Comparing libev/ev.pod (file contents):
Revision 1.72 by root, Fri Dec 7 20:19:16 2007 UTC vs.
Revision 1.74 by root, Sat Dec 8 14:12:08 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
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.
770 771
772You I<must not> change the priority of a watcher as long as it is active or
773pending.
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
775fine, as long as you do not mind that the priority value you query might 779fine, as long as you do not mind that the priority value you query might
776or might not have been adjusted to be within valid range. 780or might not have been adjusted to be within valid range.
781
782=item ev_invoke (loop, ev_TYPE *watcher, int revents)
783
784Invoke the C<watcher> with the given C<loop> and C<revents>. Neither
785C<loop> nor C<revents> need to be valid as long as the watcher callback
786can deal with that fact.
787
788=item int ev_clear_pending (loop, ev_TYPE *watcher)
789
790If the watcher is pending, this function returns clears its pending status
791and returns its C<revents> bitset (as if its callback was invoked). If the
792watcher isn't pending it does nothing and returns C<0>.
777 793
778=back 794=back
779 795
780 796
781=head2 ASSOCIATING CUSTOM DATA WITH A WATCHER 797=head2 ASSOCIATING CUSTOM DATA WITH A WATCHER

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines