diff options
| author | Gordon Sim <gsim@apache.org> | 2010-12-10 09:17:18 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2010-12-10 09:17:18 +0000 |
| commit | 466c5dc531c7ef4f535a753cd98c611b6e8a0f14 (patch) | |
| tree | d46228cee374679a6d0eb76f307148ee1b2b7331 /cpp/src/qpid/sys/BlockingQueue.h | |
| parent | 91723b2f5449f4eab8fd4b6db745eb4d97ee7064 (diff) | |
| download | qpid-python-466c5dc531c7ef4f535a753cd98c611b6e8a0f14.tar.gz | |
QPID-2966: Add QMF method to dynamically set the log level.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1044248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/BlockingQueue.h')
| -rw-r--r-- | cpp/src/qpid/sys/BlockingQueue.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/BlockingQueue.h b/cpp/src/qpid/sys/BlockingQueue.h index 210cb4ad82..ca6b529930 100644 --- a/cpp/src/qpid/sys/BlockingQueue.h +++ b/cpp/src/qpid/sys/BlockingQueue.h @@ -53,9 +53,13 @@ public: Waitable::ScopedWait w(waitable); if (timeout == TIME_INFINITE) { while (queue.empty()) waitable.wait(); - } else { + } else if (timeout) { AbsTime deadline(now(),timeout); while (queue.empty() && deadline > now()) waitable.wait(deadline); + } else { + //ensure zero timeout pop does not miss the fact that + //queue is closed + waitable.checkException(); } } if (queue.empty()) return false; |
