Fork vs pThreadsby ThelmaJay (Novice)
|on Oct 21, 2013 at 09:01 UTC||Need Help??|
ThelmaJay has asked for the
wisdom of the Perl Monks concerning the following question:
I'm relatively new to Perl.
I'm with a multi-thread dilemma :).
To implement a multitask environment I used Forks (Parallel::ForkManager). But I think forking is not the solution I need.
I create 50 forks each one is responsible for parsing a stream.
But if one of the streams is bigger than the other 49, these 49 instead of starting to parse new streams they have to wait for the one that is taking more time to process.
How can I "unblock" the other threads? Is forking the solution?
If I remove wait_all_children() what would happen?
Best Regards, thank you for your help.