--- EV/EV.pm 2007/11/28 19:22:16 1.58 +++ EV/EV.pm 2007/12/06 03:13:07 1.61 @@ -69,7 +69,7 @@ use strict; BEGIN { - our $VERSION = '1.5'; + our $VERSION = '1.6'; use XSLoader; XSLoader::load "EV", $VERSION; } @@ -133,6 +133,11 @@ When called with an argument of EV::UNLOOP_ALL, all calls to EV::loop will return as fast as possible. +=item $count = EV::loop_count + +Return the number of times the event loop has polled for new +events. Sometiems useful as a generation counter. + =item EV::once $fh_or_undef, $events, $timeout, $cb->($revents) This function rolls together an I/O and a timer watcher for a single @@ -750,6 +755,25 @@ =back +=head1 PERL SIGNALS + +While Perl signal handling (C<%SIG>) is not affected by EV, the behaviour +with EV is as the same as any other C library: Perl-signals will only be +handled when Perl runs, which means your signal handler might be invoked +only the next time an event callback is invoked. + +The solution is to use EV signal watchers (see C), which will +ensure proper operations with regards to other event watchers. + +If you cannot do this for whatever reason, you can also force a watcher +to be called on every event loop iteration by installing a C +watcher: + + my $async_check = EV::check sub { }; + +This ensures that perl shortly gets into control for a short time, and +also ensures slower overall operation. + =head1 THREADS Threads are not supported by this module in any way. Perl pseudo-threads @@ -786,7 +810,8 @@ =head1 SEE ALSO -L. +L (asynchronous dns), L (makes Glib/Gtk2 use EV as +event loop), L (efficient coroutines with EV). =head1 AUTHOR