tokuhirom 2007-05-02 12:38:02 Gearman::Client::Async の正しい使い方。完全版。 >|perl| use strict; use warnings; use Gearman::Client::Async; use Storable qw/freeze/; use Carp; my $num = shift @ARGV || 200; my $client = Gearman::Client::Async->new(job_servers => ['127.0.0.1']); my @tasks; my $failed = 0; Danga::Socket->AddTimer( 0 => sub { for my $i ( 1 .. $num ) { my $task = Gearman