The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MCE::Stream - Parallel stream model for chaining multiple maps and greps

VERSION

This document describes MCE::Stream version 1.499_005

SYNOPSIS

   use MCE::Stream;

   my (@a, $b);

   @a = mce_stream sub { $_ * 3 }, sub { $_ * 2 }, 1..10000;
   mce_stream \@b, sub { $_ * 3 }, sub { $_ * 2 }, 1..10000;

   ## Native Perl
   my @s = mce_map { $_ * $_ } mce_grep { $_ % 5 == 0 } 1..10000;

   ## Multiple maps and greps running in parallel (right-to-left)
   mce_stream \@s,
      { mode => 'map',  code => sub { $_ * $_ } },
      { mode => 'grep', code => sub { $_ % 5 == 0 } }, 1..10000;

DESCRIPTION

TODO ...

API DOCUMENTATION

mce_stream
   ## mce_stream is imported into the calling script.

   my @a = mce_stream sub { ... }, sub { ... }, 1..100;
mce_stream_f

TODO ...

mce_stream_s

TODO ...

init
   MCE::Stream::init {

      ## This form is available for configuring MCE options
      ## before running.

      user_begin => sub {
         print "## ", MCE->wid, "\n";
      }
      user_end => sub {
         ...
      }
   };
finish
   MCE::Stream::finish();   ## This is called automatically.

INDEX

MCE

AUTHOR

Mario E. Roy, <marioeroy AT gmail DOT com>

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.