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

Comparing libev/ev.pod (file contents):
Revision 1.408 by root, Fri May 4 19:50:38 2012 UTC vs.
Revision 1.412 by root, Fri May 4 20:47:50 2012 UTC

2858 2858
2859This mode of operation can be useful together with an C<ev_check> watcher, 2859This mode of operation can be useful together with an C<ev_check> watcher,
2860to do something on each event loop iteration - for example to balance load 2860to do something on each event loop iteration - for example to balance load
2861between different connections. 2861between different connections.
2862 2862
2863See L<Abusing an C<ev_check> watcher for its side-effect> for a longer 2863See L<< Abusing an C<ev_check> watcher for its side-effect >> for a longer
2864example. 2864example.
2865 2865
2866=head3 Watcher-Specific Functions and Data Members 2866=head3 Watcher-Specific Functions and Data Members
2867 2867
2868=over 4 2868=over 4
3875called): 3875called):
3876 3876
3877 void 3877 void
3878 wait_for_event (ev_watcher *w) 3878 wait_for_event (ev_watcher *w)
3879 { 3879 {
3880 ev_set_cb (w) = current_coro; 3880 ev_set_cb (w, current_coro);
3881 switch_to (libev_coro); 3881 switch_to (libev_coro);
3882 } 3882 }
3883 3883
3884That basically suspends the coroutine inside C<wait_for_event> and 3884That basically suspends the coroutine inside C<wait_for_event> and
3885continues the libev coroutine, which, when appropriate, switches back to 3885continues the libev coroutine, which, when appropriate, switches back to

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines