You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2010/03/30 22:57:30 UTC
svn commit: r929277 - /qpid/trunk/qpid/cpp/src/qpid/sys/PollableQueue.h
Author: aconway
Date: Tue Mar 30 20:57:30 2010
New Revision: 929277
URL: http://svn.apache.org/viewvc?rev=929277&view=rev
Log:
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.
Modified:
qpid/trunk/qpid/cpp/src/qpid/sys/PollableQueue.h
Modified: qpid/trunk/qpid/cpp/src/qpid/sys/PollableQueue.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/PollableQueue.h?rev=929277&r1=929276&r2=929277&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/PollableQueue.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/PollableQueue.h Tue Mar 30 20:57:30 2010
@@ -126,7 +126,7 @@ template <class T> PollableQueue<T>::~Po
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);
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org