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:

to

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.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^4: Hanging Threads
by WalkingZero (Sexton) on Aug 18, 2007 at 21:38 UTC
    That did correct the issue, so something with that reference is causing the issue. Is it possible that when the ->self function is called it's creating a lock on that memory space? I tried running the command you asked for the threads version, it doesn't produce any output. Thoughts on that one?
      I tried running the command you asked for the threads version, it doesn't produce any output. Thoughts on that one?

      Um. It probably means you are using a core delivered version of threads? Which version of Perl are you using?


      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.
        v5.8.8 built for i486-linux-gnu-thread-multi