Bug#632700: [perl] just a simplest AnyEvent script, tooks up almost 100% cpu of my laptop, but it works well on perl 5.14.1

anders lee jianghumanbu at gmail.com
Tue Jul 5 05:59:26 UTC 2011


Package: perl
Version: 5.12.4-1
Severity: normal

--- Please enter the report below this line. ---


--- System information. ---
Architecture: i386
Kernel:       Linux 2.6.39-2-686-pae

Debian Release: wheezy/sid
  500 unstable        mirrors.sohu.com 

--- Package information. ---
Depends                    (Version) | Installed
====================================-+-====================
perl-base               (= 5.12.4-1) | 5.12.4-1
perl-modules           (>= 5.12.4-1) | 5.12.4-1
libbz2-1.0                           | 1.0.5-6
libc6                       (>= 2.4) | 2.13-8
libdb5.1                             | 5.1.25-11
libgdbm3                  (>= 1.8.3) | 1.8.3-10
zlib1g           (>= 1:1.2.3.3.dfsg) | 1:1.2.3.4.dfsg-3


Recommends      (Version) | Installed
=========================-+-===========
netbase                   | 4.46


Suggests                        (Version) | Installed
=========================================-+-===========
perl-doc                                  | 5.12.4-1
libterm-readline-gnu-perl                 | 1.20-1+b1
 OR libterm-readline-perl-perl            | 
make                                      | 3.81-8.1



[source]

use strict;
use warnings;
use diagnostics;
use Modern::Perl;


use AnyEvent;

my $cv = AnyEvent->condvar;

my $count = 0;

my $w; $w = AnyEvent->timer(
        after => 1,
        interval => 2,
        cb => sub {
                $count++;
                warn "\$count = $count";
                if ($count >= 10) {
                        undef $w;
                        say "exiting...\n";
                        exit;
                }
);

$cv->recv;






More information about the Perl-maintainers mailing list