Parallel::SubFork::Task is a class to run Perl functions in forked processes.
SYNOPSIS
use Parallel::SubFork::Task;
# Run a some arbitrary Perl code in a separated process
my $task = Parallel::SubFork::Task->start(&job, @args);
$task->wait_for();
# Create and execute the task (same as above)
my $task2 = Parallel::SubFork::Task->new(&job, @args);
$task2->execute();
$task2->wait_for();
# Access any of the properties
printf "PID of task was %s
", $task->pid;
printf "Args of task where %s
", join(", ", $task->args);
printf "Exit code: %d
", $task->exit_code;
This module provides a simpler way to run arbitrary Perl code in a different process. This module consists of a fancy wrapper over the system calls fork and waitpid. The idea is to execute any standard Perl function in a different process without any of the inconveniences of managing the forks by hand.
Product's homepage
Requirements:
· Perl