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

Comparing EV/EV.pm (file contents):
Revision 1.127 by root, Sun Mar 28 15:48:21 2010 UTC vs.
Revision 1.128 by root, Thu Oct 21 02:46:59 2010 UTC

950=item $w = $loop->check_ns ($callback) 950=item $w = $loop->check_ns ($callback)
951 951
952Call the callback just after the process wakes up again (after it has 952Call the callback just after the process wakes up again (after it has
953gathered events), but before any other callbacks have been invoked. 953gathered events), but before any other callbacks have been invoked.
954 954
955This is used to integrate other event-based software into the EV 955This can be used to integrate other event-based software into the EV
956mainloop: You register a prepare callback and in there, you create io and 956mainloop: You register a prepare callback and in there, you create io and
957timer watchers as required by the other software. Here is a real-world 957timer watchers as required by the other software. Here is a real-world
958example of integrating Net::SNMP (with some details left out): 958example of integrating Net::SNMP (with some details left out):
959 959
960 our @snmp_watcher; 960 our @snmp_watcher;
994The callbacks of the created watchers will not be called as the watchers 994The callbacks of the created watchers will not be called as the watchers
995are destroyed before this can happen (remember EV::check gets called 995are destroyed before this can happen (remember EV::check gets called
996first). 996first).
997 997
998The C<check_ns> variant doesn't start (activate) the newly created watcher. 998The C<check_ns> variant doesn't start (activate) the newly created watcher.
999
1000=item EV::CHECK constant issues
1001
1002Like all other watcher types, there is a bitmask constant for use in
1003C<$revents> and other places. The C<EV::CHECK> is special as it has
1004the same name as the C<CHECK> sub called by Perl. This doesn't cause
1005big issues on newer perls (beginning with 5.8.9), but it means thatthe
1006constant must be I<inlined>, i.e. runtime calls will not work. That means
1007that as long as you always C<use EV> and then C<EV::CHECK> you are on the
1008safe side.
999 1009
1000=back 1010=back
1001 1011
1002 1012
1003=head3 FORK WATCHERS - the audacity to resume the event loop after a fork 1013=head3 FORK WATCHERS - the audacity to resume the event loop after a fork

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines