From 98ec4b4e9226b7d9221dfd5a8eeddd408e3e1caf Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 5 Sep 2008 19:53:44 +0000 Subject: Fixed cluster membership notification. Cluster events with RefCountedBuffers for queueing. PollableQueue clears bacth immediately. Improved perfdist: clients hit multiple brokers in a cluster. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@692521 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/PollableQueue.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/cluster/PollableQueue.h') diff --git a/cpp/src/qpid/cluster/PollableQueue.h b/cpp/src/qpid/cluster/PollableQueue.h index 29891da344..74da2df750 100644 --- a/cpp/src/qpid/cluster/PollableQueue.h +++ b/cpp/src/qpid/cluster/PollableQueue.h @@ -89,9 +89,13 @@ template void PollableQueue::dispatch(sys::DispatchHandle& h) { batch.clear(); batch.swap(queue); condition.clear(); - ScopedUnlock u(lock); - callback(batch.begin(), batch.end()); // Process outside the lock to allow concurrent push. - h.rewatch(); + { + // Process outside the lock to allow concurrent push. + ScopedUnlock u(lock); + callback(batch.begin(), batch.end()); + h.rewatch(); + } + batch.clear(); } }} // namespace qpid::cluster -- cgit v1.2.1