NAME

Proc::JobQueue::DependencyTask - callbacks for use with DependencyQueue

SYNOPSIS

use Proc::JobQueue::DependencyTask;
use Object::Dependency;

my $graph = Object::Dependency->new()

my $task = Proc::JobQueue::DependencyTask->new( $description, $callback );

$graph->add($task);

DESCRIPTION

A task is lighter than a job (Proc::JobQueue::DependencyJob) -- it is never more than a callback. It does not get schedueled as a job (Proc::JobQueue).

A task requires a callback. That callback's return value can be one of:

Tasks can be put in a dependency graph (Object::Dependency) and used by Proc::JobQueue::DependencyQueue.

done

Remove this task from the dependency graph.

requeue

Unlock the task in the dependency graph so that it can be called again. Optionally replace the callback.

keep

Keep the dependency around but take no further action.

Later, the task will need to removed from the dependency graph with

$dependency_graph->remove_dependency($task)

LICENSE

This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.