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

Comparing libev/ev.pod (file contents):
Revision 1.389 by sf-exg, Tue Dec 20 14:46:49 2011 UTC vs.
Revision 1.390 by root, Tue Dec 20 15:41:55 2011 UTC

3823 switch_to (libev_coro); 3823 switch_to (libev_coro);
3824 } 3824 }
3825 3825
3826That basically suspends the coroutine inside C<wait_for_event> and 3826That basically suspends the coroutine inside C<wait_for_event> and
3827continues the libev coroutine, which, when appropriate, switches back to 3827continues the libev coroutine, which, when appropriate, switches back to
3828this or any other coroutine. I am sure if you sue this your own :) 3828this or any other coroutine.
3829 3829
3830You can do similar tricks if you have, say, threads with an event queue - 3830You can do similar tricks if you have, say, threads with an event queue -
3831instead of storing a coroutine, you store the queue object and instead of 3831instead of storing a coroutine, you store the queue object and instead of
3832switching to a coroutine, you push the watcher onto the queue and notify 3832switching to a coroutine, you push the watcher onto the queue and notify
3833any waiters. 3833any waiters.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines