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 reply to Re^3: Thread exit errors
by dave_the_m
in thread Thread exit errors
by JFarr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |