summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/Serializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/sys/Serializer.cpp')
-rw-r--r--cpp/src/qpid/sys/Serializer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/Serializer.cpp b/cpp/src/qpid/sys/Serializer.cpp
index 76dfaa6f6a..6d6caff5a1 100644
--- a/cpp/src/qpid/sys/Serializer.cpp
+++ b/cpp/src/qpid/sys/Serializer.cpp
@@ -36,9 +36,10 @@ SerializerBase::SerializerBase(bool allowImmediate, VoidFn0 notifyDispatchFn)
notifyDispatch = boost::bind(&SerializerBase::notifyWorker, this);
}
-SerializerBase::~SerializerBase() {
+void SerializerBase::shutdown() {
{
Mutex::ScopedLock l(lock);
+ if (state == SHUTDOWN) return;
state = SHUTDOWN;
lock.notify();
}