… | |
… | |
908 | |
908 | |
909 | =item ev_invoke_pending (loop) |
909 | =item ev_invoke_pending (loop) |
910 | |
910 | |
911 | This call will simply invoke all pending watchers while resetting their |
911 | This call will simply invoke all pending watchers while resetting their |
912 | pending state. Normally, C<ev_run> does this automatically when required, |
912 | pending state. Normally, C<ev_run> does this automatically when required, |
913 | but when overriding the invoke callback this call comes handy. |
913 | but when overriding the invoke callback this call comes handy. This |
|
|
914 | function can be invoked from a watcher - this can be useful for example |
|
|
915 | when you want to do some lengthy calculation and want to pass further |
|
|
916 | event handling to another thread (you still have to make sure only one |
|
|
917 | thread 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 | |
917 | Returns the number of pending watchers - zero indicates that no watchers |
921 | Returns the number of pending watchers - zero indicates that no watchers |
918 | are pending. |
922 | are pending. |