qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r589636 - /incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConcurrentQueue.h
Date Mon, 29 Oct 2007 14:17:35 GMT
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.
-     *@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;



Mime
View raw message