activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1147883 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
Date Mon, 18 Jul 2011 14:04:08 GMT
Author: tabish
Date: Mon Jul 18 14:04:07 2011
New Revision: 1147883

URL: http://svn.apache.org/viewvc?rev=1147883&view=rev
Log:
Fixes a deadlock that can occur when many threads are interrupted at one time.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp?rev=1147883&r1=1147882&r2=1147883&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Threading.cpp
Mon Jul 18 14:04:07 2011
@@ -687,14 +687,12 @@ namespace {
             thread->interrupted = false;
         }
 
-        PlatformThread::lockMutex(library->globalLock);
         if (thread->interruptingThread) {
             PlatformThread::lockMutex(thread->interruptingThread->mutex);
             thread->interruptingThread->canceled = true;
             PlatformThread::unlockMutex(thread->interruptingThread->mutex);
             thread->interruptingThread = NULL;
         }
-        PlatformThread::unlockMutex(library->globalLock);
 
         PlatformThread::unlockMutex(thread->mutex);
 



Mime
View raw message