There's more than one way to do things | |
PerlMonks |
Re^3: Thread exit errorsby dave_the_m (Monsignor) |
on Nov 17, 2005 at 23:06 UTC ( [id://509633]=note: print w/replies, xml ) | Need Help?? |
$_->join for threads->list, what does this do.
It simply waits for, and then joins, any remaining threads. Your problem is simply to ensure that the main process doesn't exit until all threads have been joined. My example is just a simple way to ensure that all remaining threads have been joined. Please bear in mind that threads in perl are extremely expensive to create and consume a lot of memory, so I suspect that creating new threads in findHostNodes is a bad idea. Dave.
In Section
Seekers of Perl Wisdom
|
|