Parallel::Simple

Parallel::Simple is a Perl module that offers the simplest way to run code blocks in parallel.
Download

Parallel::Simple Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ofer Nave
  • Publisher web site:
  • http://search.cpan.org/~odigity/Parallel-Simple-0.01/lib/Parallel/Simple.pm

Parallel::Simple Tags


Parallel::Simple Description

Parallel::Simple is a Perl module that offers the simplest way to run code blocks in parallel. Parallel::Simple is a Perl module that offers the simplest way to run code blocks in parallel.SYNOPSIS use Parallel::Simple qw( prun ); # style 1: simple list of code blocks prun( sub { print "$$ foon" }, &my_bar_func, ) or die( Parallel::Simple::errplus() ); # style 1 with options prun( sub { print "$$ foon" }, &my_bar_func, { use_return => 1 }, ) or die( Parallel::Simple::errplus() ); # style 2: named code blocks (like the Benchmark module) prun( foo => sub { print "$$ foon" }, bar => &my_bar_func, ) or die( Parallel::Simple::errplus() ); # getting fancy with arg binding prun( , , ) or die( Parallel::Simple::errplus() );I generally write my scripts in a linear fashion. Do A, then B, then C. However, I often have parts that don't depend on each other, and therefore don't have to run in any particular order, or even linearly. I could save time by running them in parallel - but I'm too lazy to deal with forking, and reaping zombie processes, and other nastiness.The goal of this module is to make it so mind-numbingly simple to run blocks of code in parallel that there is no longer any excuse not to do it, and in the process, drastically cut down the runtimes of many of our applications, especially when running on multi-processor servers (which are pretty darn common these days).Parallel code execution is now as simple as calling prun and passing it a list of code blocks to run, followed by testing the return value for truth using the common "or die" perl idiom. Requirements: · Perl


Parallel::Simple Related Software