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

Comparing libev/ev.pod (file contents):
Revision 1.311 by root, Thu Oct 21 14:40:07 2010 UTC vs.
Revision 1.313 by root, Fri Oct 22 05:44:33 2010 UTC

908 908
909=item ev_invoke_pending (loop) 909=item ev_invoke_pending (loop)
910 910
911This call will simply invoke all pending watchers while resetting their 911This call will simply invoke all pending watchers while resetting their
912pending state. Normally, C<ev_run> does this automatically when required, 912pending state. Normally, C<ev_run> does this automatically when required,
913but when overriding the invoke callback this call comes handy. 913but when overriding the invoke callback this call comes handy. This
914function can be invoked from a watcher - this can be useful for example
915when you want to do some lengthy calculation and want to pass further
916event handling to another thread (you still have to make sure only one
917thread executes within C<ev_invoke_pending> or C<ev_run> of course).
914 918
915=item int ev_pending_count (loop) 919=item int ev_pending_count (loop)
916 920
917Returns the number of pending watchers - zero indicates that no watchers 921Returns the number of pending watchers - zero indicates that no watchers
918are pending. 922are pending.
1159and call libev functions on it that are documented to work on active watchers. 1163and call libev functions on it that are documented to work on active watchers.
1160 1164
1161=item pending 1165=item pending
1162 1166
1163If a watcher is active and libev determines that an event it is interested 1167If a watcher is active and libev determines that an event it is interested
1164in has occured (such as a timer expiring), it will become pending. It will 1168in has occurred (such as a timer expiring), it will become pending. It will
1165stay in this pending state until either it is stopped or its callback is 1169stay in this pending state until either it is stopped or its callback is
1166about to be invoked, so it is not normally pending inside the watcher 1170about to be invoked, so it is not normally pending inside the watcher
1167callback. 1171callback.
1168 1172
1169The watcher might or might not be active while it is pending (for example, 1173The watcher might or might not be active while it is pending (for example,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines