diff options
| author | Alan Conway <aconway@apache.org> | 2008-12-17 17:14:14 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-12-17 17:14:14 +0000 |
| commit | 95c47fee3cac671dc84d533bd2a5cf28f050da37 (patch) | |
| tree | 1538169816543c2ded6b5f55934fbd5b2cffe6aa /qpid/cpp/src | |
| parent | 11be2edc9ffbb0c1b7c69ab8c570eb62667020b1 (diff) | |
| download | qpid-python-95c47fee3cac671dc84d533bd2a5cf28f050da37.tar.gz | |
Default --cluster-read-max to 0.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@727444 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/sys/PollableQueue.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/qpid/cpp/src/qpid/sys/PollableQueue.h b/qpid/cpp/src/qpid/sys/PollableQueue.h index 7f11cc35a9..56c1d9e80a 100644 --- a/qpid/cpp/src/qpid/sys/PollableQueue.h +++ b/qpid/cpp/src/qpid/sys/PollableQueue.h @@ -119,17 +119,15 @@ template <class T> void PollableQueue<T>::dispatch(sys::DispatchHandle& h) { ScopedLock l(lock); assert(dispatcher.id() == 0); dispatcher = Thread::current(); - while (!stopped && !queue.empty()) { - assert(batch.empty()); - batch.swap(queue); - { - ScopedUnlock u(lock); // Allow concurrent push to queue. - callback(batch); - } - if (!batch.empty()) { - queue.insert(queue.begin(), batch.begin(), batch.end()); // put back unprocessed items. - batch.clear(); - } + assert(batch.empty()); + batch.swap(queue); + { + ScopedUnlock u(lock); // Allow concurrent push to queue. + callback(batch); + } + if (!batch.empty()) { + queue.insert(queue.begin(), batch.begin(), batch.end()); // put back unprocessed items. + batch.clear(); } dispatcher = Thread(); if (queue.empty()) condition.clear(); |
