From 10cffba292b487e48a5b3ad9ccaf628710bc622b Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 29 Oct 2007 14:17:32 +0000 Subject: 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 --- cpp/src/qpid/sys/ConcurrentQueue.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'cpp') 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 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; -- cgit v1.2.1