Holding a mutex then croak()ing strikes me as deadlock.
authorNicholas Clark <nick@ccl4.org>
Sat, 17 Sep 2005 18:05:30 +0000 (18:05 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 17 Sep 2005 18:05:30 +0000 (18:05 +0000)
p4raw-id: //depot/perl@25442

ext/threads/threads.xs

index d80f093..272a2a6 100755 (executable)
@@ -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) {