summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/PollableQueue.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-05 19:53:44 +0000
committerAlan Conway <aconway@apache.org>2008-09-05 19:53:44 +0000
commit98ec4b4e9226b7d9221dfd5a8eeddd408e3e1caf (patch)
tree9a89658107dd1ecc21ee9cd9a0e979d77d80e7bb /cpp/src/qpid/cluster/PollableQueue.h
parent34048060a1c00291e0d7a56725001deb3100c6e2 (diff)
downloadqpid-python-98ec4b4e9226b7d9221dfd5a8eeddd408e3e1caf.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/cluster/PollableQueue.h')
-rw-r--r--cpp/src/qpid/cluster/PollableQueue.h10
1 files changed, 7 insertions, 3 deletions
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 <class T> void PollableQueue<T>::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