diff options
author | Gordon Sim <gsim@apache.org> | 2007-11-09 15:35:49 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-11-09 15:35:49 +0000 |
commit | 0d7bb38278803b6ac935c0f47edc8a641afa0e52 (patch) | |
tree | 56edd0709eef802eff5b72fc254d19571dab1b96 /cpp/src/qpid/sys/Serializer.cpp | |
parent | 13ef73c124a5797d069d162acc4336ed99d0e35a (diff) | |
download | qpid-python-0d7bb38278803b6ac935c0f47edc8a641afa0e52.tar.gz |
Fix race in destruction of serializer.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@593569 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/Serializer.cpp')
-rw-r--r-- | cpp/src/qpid/sys/Serializer.cpp | 3 |
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(); } |