diff options
| author | Alan Conway <aconway@apache.org> | 2008-09-05 19:53:44 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-09-05 19:53:44 +0000 |
| commit | 98ec4b4e9226b7d9221dfd5a8eeddd408e3e1caf (patch) | |
| tree | 9a89658107dd1ecc21ee9cd9a0e979d77d80e7bb /cpp/src/qpid/cluster/PollableQueue.h | |
| parent | 34048060a1c00291e0d7a56725001deb3100c6e2 (diff) | |
| download | qpid-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.h | 10 |
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 |
