The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Async::Gearman::Worker - concrete Gearman worker over an IO::Async::Stream

SYNOPSIS

DESCRIPTION

This module combines the abstract Protocol::Gearman::Worker with Net::Async::Gearman to provide an asynchronous concrete Gearman worker implementation.

METHODS

$worker->add_function( $name, $code )

Adds a new function to the collection known by the worker. On connection to the server, it will declare the names of all of these by using the can_do method.

The code itself will be invoked with a Job object, and is expected to return a Future that will give the eventual result of the function. It is not necessary to invoke the complete or fail methods on the Job; that will be done automatically when the Future becomes ready.

 $f = $code->( $job )

TODO

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>