--- AnyEvent/lib/AnyEvent.pm 2006/12/31 11:54:43 1.22 +++ AnyEvent/lib/AnyEvent.pm 2007/10/27 15:10:09 1.28 @@ -197,7 +197,8 @@ The known classes so far are: - AnyEvent::Impl::Coro based on Coro::Event, best choise. + AnyEvent::Impl::Coro based on Coro::Event, best choice. + EV::AnyEvent based on EV (an interface to libevent) AnyEvent::Impl::Event based on Event, also best choice :) AnyEvent::Impl::Glib based on Glib, second-best choice. AnyEvent::Impl::Tk based on Tk, very bad choice. @@ -247,9 +248,10 @@ no warnings; use strict; + use Carp; -our $VERSION = '2.51'; +our $VERSION = '2.55'; our $MODEL; our $AUTOLOAD; @@ -261,6 +263,7 @@ my @models = ( [Coro::Event:: => AnyEvent::Impl::Coro::], + [EV:: => EV::AnyEvent::], [Event:: => AnyEvent::Impl::Event::], [Glib:: => AnyEvent::Impl::Glib::], [Tk:: => AnyEvent::Impl::Tk::], @@ -388,12 +391,14 @@ $PID_CB{$pid}{$arg{cb}} = $arg{cb}; unless ($WNOHANG) { - $CHLD_W = AnyEvent->signal (signal => 'CHLD', cb => \&_child_wait); $WNOHANG = eval { require POSIX; &POSIX::WNOHANG } || 1; } - # child could be a zombie already - $PID_IDLE ||= AnyEvent->timer (after => 0, cb => \&_child_wait); + unless ($CHLD_W) { + $CHLD_W = AnyEvent->signal (signal => 'CHLD', cb => \&_child_wait); + # child could be a zombie already + $PID_IDLE ||= AnyEvent->timer (after => 0, cb => \&_child_wait); + } bless [$pid, $arg{cb}], "AnyEvent::Base::Child" } @@ -439,7 +444,7 @@ I also cheats a bit by not providing blocking access to condition variables: code blocking while waiting for a condition will C. This still works with most modules/usages, and blocking calls must -not be in an interactive appliation, so it makes sense. +not be in an interactive application, so it makes sense. =head1 ENVIRONMENT VARIABLES