Asynchronous job processing

Brad Fitzpatrick brad at danga.com
Tue Dec 18 10:54:02 UTC 2007


Use Gearman::Client::Async if you're using Gearman client with
Danga::Socket.


On Mon, 17 Dec 2007, Sam Tregar wrote:

> On 12/17/07, Andrew Shitov <andy at shitov.ru> wrote:
> >
> > Considered using on_complete?
> >
> >
> > my $taskset = $client->new_task_set();
> > $taskset->add_task("nslookup" => 'rian.ru', {
> >     on_complete => sub {print ${$_[0]}}
> > });
> > $taskset->add_task("host" => 'rian.ru', {
> >     on_complete => sub {print ${$_[0]}}
> > });
> > $taskset->wait;
>
>
> That wait() call will pause until the results are done, which is what I'm
> trying to
> avoid.  Thanks though!
>
> -sam
>


More information about the Gearman mailing list