Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Comment on

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

Clearly, you should make sure before going too far that you do have the computing resources necessary to allow the computations to really occur “in parallel” on the hardware, and that you do not pay an advantage-overwhelming cost with the disk I/O.   Consider using some kind of thread-safe but in-memory queue to send results back ... perhaps sending them, not to the parent, but to a data-collecting child who does nothing else but listen on that queue.   (Yes, you are right about blessing:   it simply flips a bit and associates the object with a package-name.)   But first and foremost ... set up a little-bitty test case as a proof of concept to make sure that your idea is actually worth developing to a full-on implementation.   In too-many cases, although certainly not all of them, “fancy-pants multithreading” can actually run slower or, almost as embarrassing, no faster.   Stick your toes in the water before putting on your bathing suit on this one.

If it does work for you, Parallel::ForkManager is a very good tool.


In reply to Re: Parallel::ForkManager pass object from child to parent by sundialsvc4
in thread Parallel::ForkManager pass object from child to parent by david2008

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (2)
    As of 2014-09-21 21:37 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      How do you remember the number of days in each month?











      Results (176 votes), past polls