ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/EV.pm
(Generate patch)

Comparing EV/EV.pm (file contents):
Revision 1.100 by root, Tue Jul 8 18:53:11 2008 UTC vs.
Revision 1.103 by root, Thu Oct 2 07:49:09 2008 UTC

75 75
76no warnings; 76no warnings;
77use strict; 77use strict;
78 78
79BEGIN { 79BEGIN {
80 our $VERSION = '3.43'; 80 our $VERSION = '3.44';
81 use XSLoader; 81 use XSLoader;
82 XSLoader::load "EV", $VERSION; 82 XSLoader::load "EV", $VERSION;
83} 83}
84 84
85@EV::IO::ISA = 85@EV::IO::ISA =
130for more info. 130for more info.
131 131
132The loop will automatically be destroyed when it is no longer referenced 132The loop will automatically be destroyed when it is no longer referenced
133by any watcher and the loop object goes out of scope. 133by any watcher and the loop object goes out of scope.
134 134
135Using C<EV::FLAG_FORKCHECK> is recommended, as only the default event loop 135If you are not embedding the loop, then Using C<EV::FLAG_FORKCHECK>
136is protected by this module. 136is recommended, as only the default event loop is protected by this
137module. If you I<are> embedding this loop in the default loop, this is not
138necessary, as C<EV::embed> automatically does the right thing on fork.
137 139
138=item $loop->loop_fork 140=item $loop->loop_fork
139 141
140Must be called after a fork in the child, before entering or continuing 142Must be called after a fork in the child, before entering or continuing
141the event loop. An alternative is to use C<EV::FLAG_FORKCHECK> which calls 143the event loop. An alternative is to use C<EV::FLAG_FORKCHECK> which calls
976 # use the default loop otherwise 978 # use the default loop otherwise
977 $socket_loop ||= EV::default_loop; 979 $socket_loop ||= EV::default_loop;
978 980
979=over 4 981=over 4
980 982
981=item $w = EV::embed $otherloop, $callback 983=item $w = EV::embed $otherloop[, $callback]
982 984
983=item $w = EV::embed_ns $otherloop, $callback 985=item $w = EV::embed_ns $otherloop[, $callback]
984 986
985=item $w = $loop->embed ($otherloop, $callback) 987=item $w = $loop->embed ($otherloop[, $callback])
986 988
987=item $w = $loop->embed_ns ($otherloop, $callback) 989=item $w = $loop->embed_ns ($otherloop[, $callback])
988 990
989Call the callback when the embedded event loop (C<$otherloop>) has any 991Call the callback when the embedded event loop (C<$otherloop>) has any
990I/O activity. The C<$callback> should alwas be specified as C<undef> in 992I/O activity. The C<$callback> is optional: if it is missing, then the
991this version of EV, which means the embedded event loop will be managed 993embedded event loop will be managed automatically (which is recommended),
992automatically. 994otherwise you have to invoke C<sweep> yourself.
993 995
994The C<embed_ns> variant doesn't start (activate) the newly created watcher. 996The C<embed_ns> variant doesn't start (activate) the newly created watcher.
995 997
996=back 998=back
997 999

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines