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 | 8b406b8d90abe83250c4ec67532fd6d31fe17aeb (patch) | |
| tree | 762fda3cc64dea2a6006216b5da59192d8c97625 /qpid/cpp/src | |
| parent | 4227539d7bb340ebf0c775329e2659f412e9c40f (diff) | |
| download | qpid-python-8b406b8d90abe83250c4ec67532fd6d31fe17aeb.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@589636 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/sys/ConcurrentQueue.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/qpid/cpp/src/qpid/sys/ConcurrentQueue.h b/qpid/cpp/src/qpid/sys/ConcurrentQueue.h index cf8199954e..43e82cadce 100644 --- a/qpid/cpp/src/qpid/sys/ConcurrentQueue.h +++ b/qpid/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; |
