diff options
author | Alan Conway <aconway@apache.org> | 2007-10-29 14:17:32 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-10-29 14:17:32 +0000 |
commit | 10cffba292b487e48a5b3ad9ccaf628710bc622b (patch) | |
tree | a8c4f6517c99e5ed7d8b8ad818df89fac01ef19d /cpp/src | |
parent | 747e8f422eca6cb2cbf430c21e32176211e9c7bc (diff) | |
download | qpid-python-10cffba292b487e48a5b3ad9ccaf628710bc622b.tar.gz |
Avoid use of wait(AbsTime::farFuture()) - causes hanging on 32 bit.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@589636 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/sys/ConcurrentQueue.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/cpp/src/qpid/sys/ConcurrentQueue.h b/cpp/src/qpid/sys/ConcurrentQueue.h index cf8199954e..43e82cadce 100644 --- a/cpp/src/qpid/sys/ConcurrentQueue.h +++ b/cpp/src/qpid/sys/ConcurrentQueue.h @@ -79,18 +79,15 @@ template <class T> class ConcurrentQueue : public Waitable { return true; } - /** Wait up to a timeout for a data item to be available. - *@return true if data was available, false if timed out or shut down. - *@throws ShutdownException if the queue is destroyed. + /** Wait for a data item to be available. + * Return false if shut down. */ - bool waitPop(T& data, Duration timeout=TIME_INFINITE) { + bool waitPop(T& data) { ScopedLock l(lock); - AbsTime deadline(now(), timeout); { ScopedWait(*this); while (!shutdownFlag && queue.empty()) - if (!lock.wait(deadline)) - return false; + lock.wait(); } if (queue.empty()) return false; |