summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/BlockingQueue.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-06-12 19:19:22 +0000
committerAlan Conway <aconway@apache.org>2008-06-12 19:19:22 +0000
commitc3c98db893d6e127dc5e0037fb2c3548e8f90a5a (patch)
treee3d43bfd62f9423c951df3bb3ea8dc2ba4aa2de3 /cpp/src/qpid/sys/BlockingQueue.h
parentcaecb76180dfe85da79064e9733a3ca79c55f141 (diff)
downloadqpid-python-c3c98db893d6e127dc5e0037fb2c3548e8f90a5a.tar.gz
Propagate error messages across the Demux between network & user threads.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@667205 13f79535-47bb-0310-9956-ffa450edef68
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 dd709c6bff..86020fad81 100644
--- a/cpp/src/qpid/sys/BlockingQueue.h
+++ b/cpp/src/qpid/sys/BlockingQueue.h
@@ -79,13 +79,14 @@ public:
}
/**
- * Close the queue. Throws ClosedException in threads waiting in pop().
- * Blocks till all waiting threads have been notified.
+ * Close the queue.
+ *@ex exception to throw to waiting threads. ClosedException by default.
*/
- void close()
+ void close(const ExceptionHolder& ex=ExceptionHolder(new ClosedException()))
{
Waitable::ScopedLock l(lock);
if (!closed) {
+ lock.setException(ex);
closed = true;
lock.notifyAll();
lock.waitWaiters(); // Ensure no threads are still waiting.