in reply to Re^2: Hanging Threads
in thread Hanging Threads

The ->self function though appears to have been what was locking the threads and preventing them from rejoining.

Intriguing. Could you try putting those two lines back, but changing

my $threadid = threads->self:


my $threadid = threads->self->tid;

And report back what happens.

FYI. threads->self() returns the thread's object reference, threads->self->tid() returns the thread's numeric identifier.

I'm not aware that it would make a difference, but there is the possibility of some kind of circular reference prevent cleanup?

If the above change 'cures' the problem, it might be a bug worth reporting. That said, I couldn't make it happen in either of the builds I have available. Which version of threads are you using? Eg.

perl -mthreads -le"print $threads::VERSION" 1.62

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.