diff options
author | Alan Conway <aconway@apache.org> | 2010-03-30 20:57:30 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-03-30 20:57:30 +0000 |
commit | f155c23981b31df26db6968c05f72fd9eb8926ff (patch) | |
tree | 31dacf0e8dbe51b361056dfb2c59bf6ca66492f7 /cpp/src | |
parent | 9c00a0a3ecc8139c567b74738f7cfd4cd2ec6bc5 (diff) | |
download | qpid-python-f155c23981b31df26db6968c05f72fd9eb8926ff.tar.gz |
Fixed bug that caused a busy-wait if an item was pushed to a stopped queue.
Was causing cluster brokers to consume a lot of CPU when new brokers
joined the group.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@929277 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/sys/PollableQueue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/PollableQueue.h b/cpp/src/qpid/sys/PollableQueue.h index 0786b21610..cb8c126fe6 100644 --- a/cpp/src/qpid/sys/PollableQueue.h +++ b/cpp/src/qpid/sys/PollableQueue.h @@ -126,7 +126,7 @@ template <class T> PollableQueue<T>::~PollableQueue() { template <class T> void PollableQueue<T>::push(const T& t) { ScopedLock l(lock); - if (queue.empty()) condition.set(); + if (queue.empty() && !stopped) condition.set(); queue.push_back(t); } |