Author: aconway
Date: Mon Oct 29 07:17:32 2007
New Revision: 589636
URL: http://svn.apache.org/viewvc?rev=589636&view=rev
Log:
Avoid use of wait(AbsTime::farFuture()) - causes hanging on 32 bit.
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConcurrentQueue.h
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConcurrentQueue.h
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConcurrentQueue.h?rev=589636&r1=589635&r2=589636&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConcurrentQueue.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConcurrentQueue.h Mon Oct 29
07:17:32 2007
@@ -79,18 +79,15 @@
return true;
}
- /** Wait up to a timeout for a data item to be available.
- [EMAIL PROTECTED] true if data was available, false if timed out or shut
down.
- [EMAIL PROTECTED] 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;