in reply to Re: Printing to STDERR causes deadlocks.
in thread Printing to STDERR causes deadlocks.

Thanks, but on my system that modification appears to make the odds of the hang more rather than less frequent?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
Rule 1 has a caveat! -- Who broke the cabal?
  • Comment on Re^2: Printing to STDERR causes deadlocks.

Replies are listed 'Best First'.
Re^3: Printing to STDERR causes deadlocks.
by bluto (Curate) on Apr 26, 2005 at 19:56 UTC
    I'm familiar with C's pthreads so YMMV, but it looks like you are setting $$doneRef = 1 outside of the lock, after the signal is sent, so perhaps the signal is being received before the thread has a chance to set $$doneRef. Generally you'll want to set/check shared variables only when you have a lock held.