Algorithm-ConsistentHash-Ketama
view release on metacpan or search on metacpan
xt/03_threads.t view on Meta::CPAN
use strict;
use Test::More;
use Test::Requires 'threads';
use_ok "Algorithm::ConsistentHash::Ketama";
my $x = Algorithm::ConsistentHash::Ketama->new;
my @threads;
for (1..5) {
push @threads, threads->create(sub{
note( "spawned thread : " . threads->tid() );
});
}
foreach my $thr (@threads) {
note( "joining thread : " . $thr->tid );
$thr->join;
}
ok(1);
done_testing();
( run in 0.383 second using v1.01-cache-2.11-cpan-3d66aa2751a )