Net::Async::Gearman::Worker - concrete Gearman worker over an IO::Async::Stream
Net::Async::Gearman::Worker
This module combines the abstract Protocol::Gearman::Worker with Net::Async::Gearman to provide an asynchronous concrete Gearman worker implementation.
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.
can_do
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.
complete
fail
$f = $code->( $job )
Consider how much of this code can or should be moved into Protocol::Gearman::Worker itself.
Paul Evans <leonerd@leonerd.org.uk>
To install Net::Async::Gearman, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Async::Gearman
CPAN shell
perl -MCPAN -e shell install Net::Async::Gearman
For more information on module installation, please visit the detailed CPAN module installation guide.