… | |
… | |
71 | |
71 | |
72 | =cut |
72 | =cut |
73 | |
73 | |
74 | package EV; |
74 | package EV; |
75 | |
75 | |
|
|
76 | no warnings; |
76 | use strict; |
77 | use strict; |
77 | |
78 | |
78 | BEGIN { |
79 | BEGIN { |
79 | our $VERSION = '3.42'; |
80 | our $VERSION = '3.431'; |
80 | use XSLoader; |
81 | use XSLoader; |
81 | XSLoader::load "EV", $VERSION; |
82 | XSLoader::load "EV", $VERSION; |
82 | } |
83 | } |
83 | |
84 | |
84 | @EV::IO::ISA = |
85 | @EV::IO::ISA = |
… | |
… | |
975 | # use the default loop otherwise |
976 | # use the default loop otherwise |
976 | $socket_loop ||= EV::default_loop; |
977 | $socket_loop ||= EV::default_loop; |
977 | |
978 | |
978 | =over 4 |
979 | =over 4 |
979 | |
980 | |
980 | =item $w = EV::embed $otherloop, $callback |
981 | =item $w = EV::embed $otherloop[, $callback] |
981 | |
982 | |
982 | =item $w = EV::embed_ns $otherloop, $callback |
983 | =item $w = EV::embed_ns $otherloop[, $callback] |
983 | |
984 | |
984 | =item $w = $loop->embed ($otherloop, $callback) |
985 | =item $w = $loop->embed ($otherloop[, $callback]) |
985 | |
986 | |
986 | =item $w = $loop->embed_ns ($otherloop, $callback) |
987 | =item $w = $loop->embed_ns ($otherloop[, $callback]) |
987 | |
988 | |
988 | Call the callback when the embedded event loop (C<$otherloop>) has any |
989 | Call the callback when the embedded event loop (C<$otherloop>) has any |
989 | I/O activity. The C<$callback> should alwas be specified as C<undef> in |
990 | I/O activity. The C<$callback> is optional: if it is missing, then the |
990 | this version of EV, which means the embedded event loop will be managed |
991 | embedded event loop will be managed automatically (which is recommended), |
991 | automatically. |
992 | otherwise you have to invoke C<sweep> yourself. |
992 | |
993 | |
993 | The C<embed_ns> variant doesn't start (activate) the newly created watcher. |
994 | The C<embed_ns> variant doesn't start (activate) the newly created watcher. |
994 | |
995 | |
995 | =back |
996 | =back |
996 | |
997 | |