Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Parallel::ForkManager pass object from child to parent

by sundialsvc4 (Abbot)
on Feb 05, 2013 at 14:04 UTC ( #1017176=note: print w/ replies, xml ) Need Help??


in reply to Parallel::ForkManager pass object from child to parent

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.


Comment on Re: Parallel::ForkManager pass object from child to parent

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2014-12-25 11:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls