logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Gearman::Taskset - a taskset in Gearman, from the point of view of a Gearman::Client

Description

       Gearman::Taskset is a Gearman::Client's representation of tasks queue

Methods

new($client)wait(%opts)
       Waits for a response from the job server for any of the tasks listed in the taskset. Will call the on_*
       handlers for each of the tasks that have been completed, updated, etc.  Doesn't return until everything
       has finished running or failing.

   add_task(Gearman::Task)add_task($func,<$scalar|$scalarref>,<$uniq|$opts_hr>
       Adds a task to the taskset.  Three different calling conventions are available.

       $opts_hr see Gearman::Task

perl v5.26.2                                       2018-08-30                              Gearman::Taskset(3pm)

Name

       Gearman::Taskset - a taskset in Gearman, from the point of view of a Gearman::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();

See Also