summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-03-30 20:57:30 +0000
committerAlan Conway <aconway@apache.org>2010-03-30 20:57:30 +0000
commit090e9f4a0f7378dc7f6192a839687948db44ea26 (patch)
tree84f38f26d74201e09836a9104ce42fff89cd6443
parent9e3c0af3491bc3ed728efa919af338a4ac52fade (diff)
downloadqpid-python-090e9f4a0f7378dc7f6192a839687948db44ea26.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@929277 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/sys/PollableQueue.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/sys/PollableQueue.h b/qpid/cpp/src/qpid/sys/PollableQueue.h
index 0786b21610..cb8c126fe6 100644
--- a/qpid/cpp/src/qpid/sys/PollableQueue.h
+++ b/qpid/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);
}