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 | 00c41fa9b4dbe87c1c22e8f43f1990a10ee866c5 (patch) | |
| tree | 31dacf0e8dbe51b361056dfb2c59bf6ca66492f7 /cpp/src/qpid | |
| parent | 6046ef580dfbc8f8c1164748168c5186a0cc9e11 (diff) | |
| download | qpid-python-00c41fa9b4dbe87c1c22e8f43f1990a10ee866c5.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/qpid')
| -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); } |
