Why not adopt me?This distribution is up for adoption! If you're interested then please contact the PAUSE module admins via email.
Proc::JobQueue::DependencyTask - callbacks for use with Proc::JobQueue
use Proc::JobQueue::DependencyTask; use Proc::JobQueue; $job_queue = Proc::JobQueue->new(); $graph = job_queue->graph(); $task = Proc::JobQueue::DependencyTask->new( $description, $callback ); $graph->add($task);
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) but rather is run as soon as it has no dependencies in the dependency gaph.
A task requires a callback. The callback is invoked in array context. The first element of the return value must be one of the following strings:
Proc::JobQueue job queues may more may not already have a dependency graph. The
graph method will add one to the job queue if it doesn't already have one. These tasks are not really manged by job queues because they are run as soon as they do not have any prerequisites in the dependency graph.
Remove this task from the dependency graph.
Unlock the task in the dependency graph so that it can be called again. If there is a second return value from the callback, the callback is replaced with the second return value.
Keep the dependency around but take no further action.
Later, the task will need to removed from the dependency graph with
Copyright (C) 2007-2008 SearchMe, Inc. Copyright (C) 2008-2010 David Sharnoff. Copyright (C) 2011 Google, Inc. This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.