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, 6 insertions, 1 deletions
diff --git a/cpp/src/qpid/sys/BlockingQueue.h b/cpp/src/qpid/sys/BlockingQueue.h
index c53949ad6f..44c95b225d 100644
--- a/cpp/src/qpid/sys/BlockingQueue.h
+++ b/cpp/src/qpid/sys/BlockingQueue.h
@@ -32,7 +32,7 @@ namespace sys {
template <class T>
class BlockingQueue
{
- sys::Waitable lock;
+ mutable sys::Waitable lock;
std::queue<T> queue;
bool closed;
@@ -95,6 +95,11 @@ public:
closed=false;
}
+ bool isClosed() const {
+ Waitable::ScopedLock l(lock);
+ return closed;
+ }
+
private:
void queueNotify(size_t ignore) {