From: Nicholas Clark Date: Sat, 17 Sep 2005 18:05:30 +0000 (+0000) Subject: Holding a mutex then croak()ing strikes me as deadlock. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3307a0c55ca8bb4e0c9a7d4f6856fee33d4f8701;p=p5sagit%2Fp5-mst-13.2.git Holding a mutex then croak()ing strikes me as deadlock. p4raw-id: //depot/perl@25442 --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index d80f093..272a2a6 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -96,6 +96,7 @@ Perl_ithread_destruct (pTHX_ ithread* thread, const char *why) PerlInterpreter *freeperl = NULL; MUTEX_LOCK(&thread->mutex); if (!thread->next) { + MUTEX_UNLOCK(&thread->mutex); Perl_croak(aTHX_ "panic: destruct destroyed thread %p (%s)",thread, why); } if (thread->count != 0) {