summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/BlockingQueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/client/BlockingQueue.h')
-rw-r--r--cpp/src/qpid/client/BlockingQueue.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/BlockingQueue.h b/cpp/src/qpid/client/BlockingQueue.h
index 7081b76b68..a9d8ec2857 100644
--- a/cpp/src/qpid/client/BlockingQueue.h
+++ b/cpp/src/qpid/client/BlockingQueue.h
@@ -62,7 +62,7 @@ public:
}
}
- void push(T t)
+ void push(const T& t)
{
sys::Monitor::ScopedLock l(lock);
bool wasEmpty = queue.empty();
@@ -78,6 +78,12 @@ public:
closed = true;
lock.notifyAll();
}
+
+ bool empty()
+ {
+ sys::Monitor::ScopedLock l(lock);
+ return queue.empty();
+ }
};
}}