From 090e9f4a0f7378dc7f6192a839687948db44ea26 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 30 Mar 2010 20:57:30 +0000 Subject: 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 --- qpid/cpp/src/qpid/sys/PollableQueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qpid/cpp') 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 PollableQueue::~PollableQueue() { template void PollableQueue::push(const T& t) { ScopedLock l(lock); - if (queue.empty()) condition.set(); + if (queue.empty() && !stopped) condition.set(); queue.push_back(t); } -- cgit v1.2.1