summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/BlockingQueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/sys/BlockingQueue.h')
-rw-r--r--cpp/src/qpid/sys/BlockingQueue.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/qpid/sys/BlockingQueue.h b/cpp/src/qpid/sys/BlockingQueue.h
index d7e6449d7a..a05a10d811 100644
--- a/cpp/src/qpid/sys/BlockingQueue.h
+++ b/cpp/src/qpid/sys/BlockingQueue.h
@@ -66,10 +66,11 @@ public:
return true;
}
- T pop() {
+ T pop(Duration timeout=TIME_INFINITE) {
T result;
- bool ok = pop(result);
- assert(ok); (void) ok; // Infinite wait.
+ bool ok = pop(result, timeout);
+ if (!ok)
+ throw Exception("Timed out waiting on a blocking queue");
return result;
}