in reply to Re^2: Nasty MultiThread problem
in thread Nasty MultiThread problem

Then you're probably not joining all active threads, either from not storing hem correctly or for some other reason (I did not look at your code). One way of ensuring that you close all threads:
$_->join for threads->list();
According to the pod of "threads"
           This will return a list of all non joined, non detached threads.
Hope this helps.