Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Parallel::ForkManager automates the sometimes tedious process of running multiple parallel forks from a script. It also allows you to control how many forks run at once, and keeps that many running, which simplifies a rather complex task. It is extremely simple in operation and well documented.

Who should use it?

Anyone who wants to implement forking in a script. I wrote a fair bit of forking code before discovering this module, and I must say, I don't think I'll go back. It makes life much easier, and isn't that what good perl modules are supposed to do?

Who should NOT use it?

There are some forking scenarios which are probably too complex for it, although I haven't found any of those myself yet. It might be difficult to use for socket server applications, since controlling the timing of the forks could be tricky. Or fun, depending on your perspective.


Excellent - clear examples and concise wording. Even I understood it.

Personal Notes

I've converted almost all of my old fork code to run with this module. It took just minutes, and performance improved (I was spawning forks N at a time, waiting for them all to die, and then spawning N more. This thing keeps N forks running all the time without Ne+02 lines of code ;-). Highly recommended!!

In reply to Parallel::ForkManager by Clownburner

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (4)
    As of 2020-12-05 12:16 GMT
    Find Nodes?
      Voting Booth?
      How often do you use taint mode?

      Results (63 votes). Check out past polls.