You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2013/02/11 19:32:42 UTC
svn commit: r1444913 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSessionExecutor.cpp
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()
}