AnyEvent-ConnPool
view release on metacpan or search on metacpan
Simple connection pool based on AnyEvent for asynchronous db connections
# AnyEvent::ConnPool
Simple asynchronous connection pool, based on anyevent.
## Description
Connection pool designed for asynchronous connections.
## Synopsis
my $connpool = AnyEvent::ConnPool->new(
constructor => sub {
create_connection();
},
check => {
cb => sub {
my $conn = shift;
lib/AnyEvent/ConnPool.pm view on Meta::CPAN
=head1 NAME
AnyEvent::ConnPool
=head1 DESCRIPTION
Simple connections pool designed for asynchronous connections
=head1 METHODS
=over
=cut
package AnyEvent::ConnPool;
use strict;
use warnings;
t/04-check.t view on Meta::CPAN
},
interval => 1,
},
init => 1,
size => 3,
);
my $timer; $timer = AnyEvent->timer(
after => 10,
cb => sub {
BAIL_OUT "Asynchronous check was failed. Bailing out.";
},
);
$cv->recv();
my $done = 1;
ok ($done, 'Successfully checked');
done_testing();
( run in 1.148 second using v1.01-cache-2.11-cpan-0d8aa00de5b )