… | |
… | |
789 | } |
789 | } |
790 | |
790 | |
791 | # use the default loop otherwise |
791 | # use the default loop otherwise |
792 | $socket_loop ||= EV::default_loop; |
792 | $socket_loop ||= EV::default_loop; |
793 | |
793 | |
794 | $w = EV::embed $otherloop, $callback |
794 | $w = EV::embed $otherloop[, $callback] |
795 | $w = EV::embed_ns $otherloop, $callback |
795 | $w = EV::embed_ns $otherloop[, $callback] |
796 | $w = $loop->embed ($otherloop, $callback) |
796 | $w = $loop->embed ($otherloop[, $callback]) |
797 | $w = $loop->embed_ns ($otherloop, $callback) |
797 | $w = $loop->embed_ns ($otherloop[, $callback]) |
798 | Call the callback when the embedded event loop ($otherloop) has any |
798 | Call the callback when the embedded event loop ($otherloop) has any |
799 | I/O activity. The $callback should alwas be specified as "undef" in |
799 | I/O activity. The $callback is optional: if it is missing, then the |
800 | this version of EV, which means the embedded event loop will be |
800 | embedded event loop will be managed automatically (which is |
801 | managed automatically. |
801 | recommended), otherwise you have to invoke "sweep" yourself. |
802 | |
802 | |
803 | The "embed_ns" variant doesn't start (activate) the newly created |
803 | The "embed_ns" variant doesn't start (activate) the newly created |
804 | watcher. |
804 | watcher. |
805 | |
805 | |
806 | ASYNC WATCHERS - how to wake up another event loop |
806 | ASYNC WATCHERS - how to wake up another event loop |