laziness, impatience, and hubris | |
PerlMonks |
Re: Nasty MultiThread problemby zentara (Archbishop) |
on Nov 19, 2005 at 12:51 UTC ( [id://510081]=note: print w/replies, xml ) | Need Help?? |
Hi, your code is kind of long, and the wrong OS, for me to test; but I think you may be running into the common misconception that $thread->join forces a thread to terminate. It dosn't as the following code shows:
If you can't be sure that all your threads have reached the end of their code block, before you try to join them, you can force them to die with a shared variable. See how this minor modification will force the thread to return early, and thus be joinable.
I'm not really a human, but I play one on earth. flash japh
In Section
Seekers of Perl Wisdom
|
|