$thr{"FREE_HOST"} = threads->create("blast_thread");
to:
threads->create("blast_thread");
$thr{"FREE_HOST"} = 1;
Seems you've stumbled on yet another way to make threaded Perl leak. Judging by the amount of memory leaked, it would seem that your way of doing it, doesn't release the memory used by the thread.
I'll be filing a bug report for this to p5p. Until then, I would say: don't do it that way. Why aren't you using a shared scalar for the flag?
Also, if you want to check whether a thread is still running, you might want to check out Thread::Running. And possibly Thread::Pool might also be of interest to you.
Liz |