in reply to Re: Re: A Memory Leak in Perl iThreads?
in thread A Memory Leak in Perl iThreads?
to:$thr{"FREE_HOST"} = threads->create("blast_thread");
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.threads->create("blast_thread"); $thr{"FREE_HOST"} = 1;
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: A Memory Leak in Perl iThreads?
by cav (Initiate) on Mar 21, 2004 at 16:43 UTC |