From 0b19752d58ea90089468c9674bfe61ce71b9ccfb Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 13 Nov 2007 13:53:01 +0000 Subject: Moved Serializer notifyWorker inside the mutex. Removed user-definable notify function, we want to get rid of Serializer, not reuse it. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@594537 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/Serializer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'cpp/src/qpid/sys/Serializer.cpp') diff --git a/cpp/src/qpid/sys/Serializer.cpp b/cpp/src/qpid/sys/Serializer.cpp index 6d6caff5a1..f02e51ddb4 100644 --- a/cpp/src/qpid/sys/Serializer.cpp +++ b/cpp/src/qpid/sys/Serializer.cpp @@ -29,12 +29,8 @@ namespace qpid { namespace sys { -SerializerBase::SerializerBase(bool allowImmediate, VoidFn0 notifyDispatchFn) - : state(IDLE), immediate(allowImmediate), notifyDispatch(notifyDispatchFn) -{ - if (notifyDispatch.empty()) - notifyDispatch = boost::bind(&SerializerBase::notifyWorker, this); -} +SerializerBase::SerializerBase(bool allowImmediate) + : state(IDLE), immediate(allowImmediate) {} void SerializerBase::shutdown() { { @@ -48,6 +44,7 @@ void SerializerBase::shutdown() { } void SerializerBase::notifyWorker() { + // Call with lock held. if (!worker.id()) worker = Thread(*this); else -- cgit v1.2.1