diff options
| author | Ted Ross <tross@apache.org> | 2009-07-02 18:09:12 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2009-07-02 18:09:12 +0000 |
| commit | f907a67e437482ab37db092f19962a53a0502819 (patch) | |
| tree | 4b8042c0ee00db6297c8b1d09b2b4556bbf31d0b /cpp/src/qpid/broker/Connection.cpp | |
| parent | 577c1e9b2e12483223efe95cd83eb0f57e9f3448 (diff) | |
| download | qpid-python-f907a67e437482ab37db092f19962a53a0502819.tar.gz | |
Federation: Propagation of dynamic bindings is now done on the thread servicing the
federation link (connection).
Also, some minor cleanup of unneeded recursive includes.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@790698 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Connection.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/Connection.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp index c4e8c4335c..a54bcc6db9 100644 --- a/cpp/src/qpid/broker/Connection.cpp +++ b/cpp/src/qpid/broker/Connection.cpp @@ -21,6 +21,7 @@ #include "Connection.h" #include "SessionState.h" #include "Bridge.h" +#include "Broker.h" #include "qpid/log/Statement.h" #include "qpid/ptr_map.h" @@ -268,13 +269,15 @@ void Connection::closed(){ // Physically closed, suspend open sessions. bool Connection::hasOutput() { return outputTasks.hasOutput(); } bool Connection::doOutput() { - try{ + try { { - ScopedLock<Mutex> l(ioCallbackLock); - while (!ioCallbacks.empty()) { - ioCallbacks.front()(); // Lend the IO thread for management processing - ioCallbacks.pop(); - } + ScopedLock<Mutex> l(ioCallbackLock); + while (!ioCallbacks.empty()) { + boost::function0<void> cb = ioCallbacks.front(); + ioCallbacks.pop(); + ScopedUnlock<Mutex> ul(ioCallbackLock); + cb(); // Lend the IO thread for management processing + } } if (mgmtClosing) close(connection::CLOSE_CODE_CONNECTION_FORCED, "Closed by Management Request"); |
