… | |
… | |
3875 | called): |
3875 | called): |
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 | |
3884 | That basically suspends the coroutine inside C<wait_for_event> and |
3884 | That basically suspends the coroutine inside C<wait_for_event> and |
3885 | continues the libev coroutine, which, when appropriate, switches back to |
3885 | continues the libev coroutine, which, when appropriate, switches back to |