Hi All,
I'm getting desparate running either subroutines in parallel
or commands run on the commandline.
There's Parallel::Jobs, Parallel:ForkManager and another
one.
Point is: I want many jobs run in parallel (for indexing
purposes), example:
my @collections = qw (col1 col2 col3 col4 col5); my max_tasks = 3; foreach my $collection_alias (@collections) { start_parallel_task($collection_alias); } wait_until_all_processes_have_finished();

Also, all output from the sub-processed should write to
STDOUT & STDERR of the parent.

It seems that the different modules can accomplish about
90% of my wish, but lacks the other 10%.

Can s'one get me a code snippet, which does this exact
thing?
I have read and read and searched and searched and tried and
tried but did not succeed. Please don't shoot if I
read/searched/tried not hard enough. ;-)
On request I can cough-up some snippets that fail.
Thanks in advance, o, enlighted monks.
John

In reply to Parallel tasks by john.goor

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.