in reply to Efficiency of threads::shared versus Thread::Pool

and they process away. I call: $_->join() foreach (@threads); ...... The problem with this approach, I've found, is that if the complexity of the hrefs, say, in Core 1, is very low that Core 1 completes its jobs much sooner than the other 2 cores, I have a core waiting around doing nothing until the other two are done.

Just something to try to free up cores, maybe detach your threads, instead of having them all wait for a join. When a detached thread reaches the end of it's code block, it should destroy itself, and I would think, free up your core.

The one big drawback to detaching is once a thread is detached, it may not be joined, and any return data that it might have produced (if it was done and waiting for a join) is lost.


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: Efficiency of threads::shared versus Thread::Pool