You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2008/07/29 15:45:31 UTC
svn commit: r680695 -
/incubator/qpid/branches/qpid.0-10/cpp/src/qpid/sys/BlockingQueue.h
Author: gsim
Date: Tue Jul 29 06:45:30 2008
New Revision: 680695
URL: http://svn.apache.org/viewvc?rev=680695&view=rev
Log:
Merged r680691
Modified:
incubator/qpid/branches/qpid.0-10/cpp/src/qpid/sys/BlockingQueue.h
Modified: incubator/qpid/branches/qpid.0-10/cpp/src/qpid/sys/BlockingQueue.h
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/qpid.0-10/cpp/src/qpid/sys/BlockingQueue.h?rev=680695&r1=680694&r2=680695&view=diff
==============================================================================
--- incubator/qpid/branches/qpid.0-10/cpp/src/qpid/sys/BlockingQueue.h (original)
+++ incubator/qpid/branches/qpid.0-10/cpp/src/qpid/sys/BlockingQueue.h Tue Jul 29 06:45:30 2008
@@ -51,8 +51,12 @@
Mutex::ScopedLock l(waitable);
{
Waitable::ScopedWait w(waitable);
- AbsTime deadline(now(),timeout);
- while (queue.empty() && deadline > now()) waitable.wait(deadline);
+ if (timeout == TIME_INFINITE) {
+ while (queue.empty()) waitable.wait();
+ } else {
+ AbsTime deadline(now(),timeout);
+ while (queue.empty() && deadline > now()) waitable.wait(deadline);
+ }
}
if (queue.empty()) return false;
result = queue.front();