summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-09-17 18:05:30 +0000
committerNicholas Clark <nick@ccl4.org>2005-09-17 18:05:30 +0000
commit3307a0c55ca8bb4e0c9a7d4f6856fee33d4f8701 (patch)
treef86859054a68cb07650437b7f94afa8ffee0a0a0 /ext
parentc99e3826c46ffcfffa9fb9cdc6d049c77e4d8112 (diff)
downloadperl-3307a0c55ca8bb4e0c9a7d4f6856fee33d4f8701.tar.gz
Holding a mutex then croak()ing strikes me as deadlock.
p4raw-id: //depot/perl@25442
Diffstat (limited to 'ext')
-rwxr-xr-xext/threads/threads.xs1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs
index d80f09349f..272a2a6dc9 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) {