From f155c23981b31df26db6968c05f72fd9eb8926ff 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/qpid@929277 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/PollableQueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpp') 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 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