AnyEvent-Tools
view release on metacpan or search on metacpan
lib/AnyEvent/Tools/Buffer.pm view on Meta::CPAN
use utf8;
use strict;
use warnings;
package AnyEvent::Tools::Buffer;
use AnyEvent::AggressiveIdle qw(aggressive_idle stop_aggressive_idle);
use AnyEvent::Util;
use Carp;
sub new
{
lib/AnyEvent/Tools/Pool.pm view on Meta::CPAN
use utf8;
use strict;
use warnings;
package AnyEvent::Tools::Pool;
use Carp;
use AnyEvent::Util;
sub new
{
my $class = shift;
t/01_mutex.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 9;
use Encode qw(decode encode);
use Time::HiRes qw(time);
BEGIN {
# ÐодгоÑовка обÑекÑа ÑеÑÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñ utf8
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent';
use_ok 'AnyEvent::Tools', ':mutex';
}
{
my $mutex = mutex;
my ($counter, $total) = (0, 0);
t/02_rw_mutex.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 8;
use Encode qw(decode encode);
use Time::HiRes qw(time);
BEGIN {
# ÐодгоÑовка обÑекÑа ÑеÑÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñ utf8
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent';
use_ok 'AnyEvent::Tools', ':mutex';
}
{
my $mutex = rw_mutex;
my $cv = condvar AnyEvent;
my $counter = 0;
t/03_repeat.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Time::HiRes qw(time);
use Test::More tests => 16;
use Encode qw(decode encode);
BEGIN {
# ÐодгоÑовка обÑекÑа ÑеÑÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñ utf8
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent';
use_ok 'AnyEvent::Tools', ':foreach';
}
{
my $cv = condvar AnyEvent;
my $count = 0;
async_repeat 0, sub { $count++ }, sub { $cv->send };
$cv->recv;
t/04_foreach_array.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 23;
use Encode qw(decode encode);
use Time::HiRes qw(time);
BEGIN {
# ÐодгоÑовка обÑекÑа ÑеÑÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñ utf8
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent';
use_ok 'AnyEvent::Tools', ':foreach';
}
{
my $cv = condvar AnyEvent;
my $count = 0;
async_for [], sub { $count++ }, sub { $cv->send };
t/05_foreach_hash.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 16;
use Encode qw(decode encode);
use Time::HiRes qw(time);
BEGIN {
# ÐодгоÑовка обÑекÑа ÑеÑÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñ utf8
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent';
use_ok 'AnyEvent::Tools', ':foreach';
}
{
my $cv = condvar AnyEvent;
my %res;
my $called = 0;
t/06_pool.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 6;
use Time::HiRes qw(time);
use Encode qw(decode encode);
use AnyEvent;
BEGIN {
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent::Tools', 'pool';
}
{
my $cv = condvar AnyEvent;
my $pool = pool qw( a b );
my $order = 0;
my @res;
t/07_buffer.t view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More tests => 25;
use Encode qw(decode encode);
use Time::HiRes qw(time);
use AnyEvent;
BEGIN {
# ÐодгоÑовка обÑекÑа ÑеÑÑиÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð´Ð»Ñ ÑабоÑÑ Ñ utf8
my $builder = Test::More->builder;
binmode $builder->output, ":utf8";
binmode $builder->failure_output, ":utf8";
binmode $builder->todo_output, ":utf8";
use_ok 'AnyEvent::AggressiveIdle', 'aggressive_idle';
use_ok 'AnyEvent::Tools', 'buffer';
}
{
my @res;
my $cv = condvar AnyEvent;
my $number = 1;
my $b = buffer
( run in 2.605 seconds using v1.01-cache-2.11-cpan-49f99fa48dc )