NAME¶
Gearman::Taskset - a taskset in Gearman, from the point of view of a client
SYNOPSIS¶
use Gearman::Client;
my $client = Gearman::Client->new;
# waiting on a set of tasks in parallel
my $ts = $client->new_task_set;
$ts->add_task( "add" => "1+2", {...});
$ts->wait();
DESCRIPTION¶
Gearman::Taskset is a Gearman::Client's representation of tasks queue t in
Gearman
METHODS¶
run_hook($name)¶
run a hook callback if defined
add_hook($name)¶
add a hook
client ()¶
this method is part of the "Taskset" interface, also implemented by
Gearman::Client::Async, where no tasksets make sense, so instead the
Gearman::Client::Async object itself is also its taskset. (the client tracks
all tasks). so don't change this, without being aware of
Gearman::Client::Async. similarly, don't access
$ts->{client} without going via this accessor.
wait()¶
event loop for reading in replies
add_task($func, <$scalar | $scalarref>, <$uniq | $opts_hr>¶
$opts_hr see Gearman::Task
process_packet($res, $sock)¶