good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Fork vs pThreadsby RichardK (Parson) |
on Oct 21, 2013 at 11:52 UTC ( [id://1059102]=note: print w/replies, xml ) | Need Help?? |
You're not really blocked, all the work is done and you're just waiting for the fork doing the most work. In your example you've got 50 units of work, while (i<50), and 50 forks, so the total time is limited by the fork that take the longest. Try reducing the number of forks and see what happens.
In Section
Seekers of Perl Wisdom
|
|