AnyEvent

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	- uts46data.pl couldn't be found due to wrong naming of the file
          (reported by Fulko Hew).
        - handle lone \015's properly in AE::Handle's default line read
          (reported by various people).
        - untaint ip addresses found in /etc/hosts (patch by José Micó).
        - the memleak fix in 7.03 caused resolving via /etc/hosts to always
          fail on first use (reported and testcase by Andrew Whatson).
        - expose AnyEvent::Log::format_time, and allow users to redefine it.
        - expose AnyEvent::Log::default_format, and allow redefinition.
        - expose AnyEvent::Log::fatal_exit, to allow redefinition.
	- AnyEvent::Debug shell can now run coro shell commands, if available.
	- t/63* tests were wrongly in MANIFEST.
        - kernel.org's finger server went MIA, switch to freebsd.org and
          icculus.org.
        - clarify that IO::AIO and AnyEvent::AIO are needed for AnyEvent::IO
          to function asynchronously (reported by Daniel Carosone).
        - hard-disable $^W in most tests, it generates too much garbage output.
        - use a (hopefully) more future-proof method to emulate common::sense.
        - upgrade to UTS-46:6.2.0.
        - switch to INSTLIB from INSTLIBDIR, as INSTLIBDIR was wrongly
          documented. should not affect anything.

Changes  view on Meta::CPAN


3.4  Sun May 11 00:29:25 CEST 2008
	- complete re-implementation of condvars with a hopefully much more useful
          API (backward compatible functions exist but are undocumented).
	- AnyEvent::Handle fully rewritten with a hopefully more powerful API
          (still subject to change).
	- take advantage of CLOCK_MONOTONIC, if available, in AnyEvent::Impl::Perl.
        - provide AnyEvent::post_detect and @AnyEvent::post_detect, which
          allows module authors to avoid forcing event loop detection.
          (used by Coro::AIO, Coro::BDB, Coro::AnyEvent for example).
        - remove coro backends: Coro now provides generic support for AnyEvent
          via Coro::AnyEvent.

3.3  Mon Apr 28 09:51:06 CEST 2008
        - added AnyEvent::Handle, AnyEvent::Socket and AnyEvent::Util modules.
        - fix a bug in the pure perl backend that kept watchers alive
          when multiple watchers were registered for the same fh/poll combo.
	- add a benchmark section showing AnyEvent overhead and comparing
          the different event loops with each other.
        - prefer pure perl over tk when autoprobing, as it's about as fast,
          but doesn't crash with many watchers.

Changes  view on Meta::CPAN

        - document the fact that child watchers only watch for zombies.
        - fix the child watcher example.

3.1  Wed Apr 16 17:09:01 CEST 2008
	- work around recurring bugs in Tk by dup'ing filehandles, the
          only method with good success chances on Tk (the bugs apparently
          don't get fixed anytime soon).
        - lift the restriction of only one watcher per fh direction
          (as the Tk bug workaround also lifts it and only Tk imposed
          such strong limits).
        - changed probe order to prefer coro adaptors.
        - explain why recursion into the event loop is not supported
          unless the backend supports it (only Coro::EV does without
          any restrictions...).
        - add simple manpages for all backend modules.

3.0  Mon Apr  7 21:30:23 CEST 2008
	- Coro::Signal changed semantics, roll our own, also cleaning
          up the Coro implementation in general.
        - rename Coro backend to CoroEvent.
        - add some decision helping paragraph to the manpage that should

README  view on Meta::CPAN

    "watcher" times, it would "->send" a condvar once to signal the end of
    this phase.

    *destroy* is the time, in microseconds, that it takes to destroy a
    single watcher.

   Results
              name watchers bytes create invoke destroy comment
             EV/EV   100000   223   0.47   0.43    0.27 EV native interface
            EV/Any   100000   223   0.48   0.42    0.26 EV + AnyEvent watchers
      Coro::EV/Any   100000   223   0.47   0.42    0.26 coroutines + Coro::Signal
          Perl/Any   100000   431   2.70   0.74    0.92 pure perl implementation
       Event/Event    16000   516  31.16  31.84    0.82 Event native interface
         Event/Any    16000  1203  42.61  34.79    1.80 Event + AnyEvent watchers
       IOAsync/Any    16000  1911  41.92  27.45   16.81 via IO::Async::Loop::IO_Poll
       IOAsync/Any    16000  1726  40.69  26.37   15.25 via IO::Async::Loop::Epoll
          Glib/Any    16000  1118  89.00  12.57   51.17 quadratic behaviour
            Tk/Any     2000  1346  20.96  10.75    8.00 SEGV with >> 2000 watchers
           POE/Any     2000  6951 108.97 795.32   14.24 via POE::Loop::Event
           POE/Any     2000  6648  94.79 774.40  575.51 via POE::Loop::Select

lib/AnyEvent.pm  view on Meta::CPAN

signal the end of this phase.

I<destroy> is the time, in microseconds, that it takes to destroy a single
watcher.

=head3 Results

          name watchers bytes create invoke destroy comment
         EV/EV   100000   223   0.47   0.43    0.27 EV native interface
        EV/Any   100000   223   0.48   0.42    0.26 EV + AnyEvent watchers
  Coro::EV/Any   100000   223   0.47   0.42    0.26 coroutines + Coro::Signal
      Perl/Any   100000   431   2.70   0.74    0.92 pure perl implementation
   Event/Event    16000   516  31.16  31.84    0.82 Event native interface
     Event/Any    16000  1203  42.61  34.79    1.80 Event + AnyEvent watchers
   IOAsync/Any    16000  1911  41.92  27.45   16.81 via IO::Async::Loop::IO_Poll
   IOAsync/Any    16000  1726  40.69  26.37   15.25 via IO::Async::Loop::Epoll
      Glib/Any    16000  1118  89.00  12.57   51.17 quadratic behaviour
        Tk/Any     2000  1346  20.96  10.75    8.00 SEGV with >> 2000 watchers
       POE/Any     2000  6951 108.97 795.32   14.24 via POE::Loop::Event
       POE/Any     2000  6648  94.79 774.40  575.51 via POE::Loop::Select

lib/AnyEvent/Debug.pm  view on Meta::CPAN

         if (defined $len ? $len == 0 : ($! != Errno::EAGAIN && $! != Errno::EWOULDBLOCK)) {
            undef $rw;
         } else {
            while ($rbuf =~ s/^(.*)\015?\012//) {
               my $line = $1;

               AnyEvent::fh_block $fh;

               if ($line =~ /^\s*exit\b/) {
                  syswrite $fh, "sorry, no... if you want to execute exit, try CORE::exit.\015\012";
               } elsif ($line =~ /^\s*coro\b\s*(.*)/) {
                  my $arg = $1;
                  if (eval { require Coro; require Coro::Debug }) {
                     if ($arg =~ /\S/) {
                        Coro::async (sub {
                           select $fh;
                           Coro::Debug::command ($arg);
                           local $| = 1; # older Coro versions do not flush
                           syswrite $fh, "> ";
                        });
                        return;

lib/AnyEvent/Debug.pm  view on Meta::CPAN

help         this command
wr [level]   sets wrap level to level (or toggles if missing)
v [level]    sets verbosity (or toggles between 0 and 9 if missing)
wl 'regex'   print wrapped watchers matching the regex (or all if missing)
i id,...     prints the watcher with the given ids in more detail
t            enable tracing for newly created watchers (enabled by default)
ut           disable tracing for newly created watchers
t  id,...    enable tracing for the given watcher (enabled by default)
ut id,...    disable tracing for the given watcher
w id,...     converts the watcher ids to watcher objects (for scripting)
coro xxx     run xxx as Coro::Debug shell command, if available
coro         switch to Coro::Debug shell, if available
EOF
   }

   sub wl(;$) {
      my $re = @_ ? qr<$_[0]>i : qr<.>;

      my %res;

      while (my ($k, $v) = each %AnyEvent::Debug::Wrapped) {
         my $s = "$v";



( run in 0.264 second using v1.01-cache-2.11-cpan-87723dcf8b7 )