| pake documentation | Contained in the pake distribution. |
Pake::MultiTask
use Pake::MultiTask;
$multi_task = Pake::MultiTask->new($code,$name,$dependency_array_ref);
$mulit_task->invoke();
MultiTask task, executes dependencies in parallel. Right now there is no guarantee that dependencies want be run more then once
Overview of overriden methods in the FileTask object
invoke_prerequisites
Parrallel invocation
inoker
Thread method invoke
| pake documentation | Contained in the pake distribution. |
package Pake::MultiTask; @ISA = qw(Pake::Task); use threads; use Scalar::Util qw(blessed); sub invoke_prerequisites { my $self = shift; my @threads = (); for $pre (@{$self->{"pre"}}){ if(blessed ($self->{"application"}{"tasks"}{$pre})){ my $thread = threads->new(\&invoker,$self->{"application"}{"tasks"}{$pre}); push @threads, $thread; } else{ warn "cannot apply rules" unless $self->{"application"}->check_rules($pre); } } for my $thread (@threads){ $thread->join(); } } sub invoker($){ my $task = shift; $task->invoke(); } 1; __END__