activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1444913 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
Date Mon, 11 Feb 2013 18:32:42 GMT
Author: tabish
Date: Mon Feb 11 18:32:42 2013
New Revision: 1444913

URL: http://svn.apache.org/r1444913
Log:
Add a double check in dtor to ensure we stop the executor thread.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp?rev=1444913&r1=1444912&r2=1444913&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
Mon Feb 11 18:32:42 2013
@@ -60,6 +60,13 @@ ActiveMQSessionExecutor::~ActiveMQSessio
 
         // Empty the message queue and destroy any remaining messages.
         clear();
+
+        // Ensure that we shutdown the taskRunner Thread before we are done.
+        Pointer<TaskRunner> taskRunner = this->taskRunner;
+        if (taskRunner != NULL) {
+            this->taskRunner.reset(NULL);
+            taskRunner->shutdown();
+        }
     }
     AMQ_CATCHALL_NOTHROW()
 }



Mime
View raw message