summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionImpl.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-06-03 13:52:37 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-06-03 13:52:37 +0000
commitf5e02db0308f72c71acf7d13c2d10c5d35325e0f (patch)
tree92f8a0243ca49b4f338de46269fb2bc675590de0 /cpp/src/qpid/client/ConnectionImpl.cpp
parent69ab06fde895f73def7084faaae320d95cba86de (diff)
downloadqpid-python-f5e02db0308f72c71acf7d13c2d10c5d35325e0f.tar.gz
Revert "Change client io threading to be initialised at first use"
This reverts commit 2e77e9b85912ccbfd29763710a973d0bbff9c684. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@781375 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp')
-rw-r--r--cpp/src/qpid/client/ConnectionImpl.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp
index 2fdf4d1d25..ccaa8c0b87 100644
--- a/cpp/src/qpid/client/ConnectionImpl.cpp
+++ b/cpp/src/qpid/client/ConnectionImpl.cpp
@@ -130,10 +130,7 @@ public:
}
};
-IOThread& theIO() {
- static IOThread io(SystemInfo::concurrency());
- return io;
-}
+static IOThread io(SystemInfo::concurrency());
class HeartbeatTask : public TimerTask {
TimeoutHandler& timeout;
@@ -176,7 +173,7 @@ ConnectionImpl::~ConnectionImpl() {
// is running.
failover.reset();
if (connector) connector->close();
- theIO().sub();
+ io.sub();
}
void ConnectionImpl::addSession(const boost::shared_ptr<SessionImpl>& session, uint16_t channel)
@@ -220,8 +217,8 @@ void ConnectionImpl::open()
int port = handler.port;
QPID_LOG(info, "Connecting to " << protocol << ":" << host << ":" << port);
- theIO().add();
- connector.reset(Connector::create(protocol, theIO().poller(), version, handler, this));
+ io.add();
+ connector.reset(Connector::create(protocol, io.poller(), version, handler, this));
connector->setInputHandler(&handler);
connector->setShutdownHandler(this);
connector->connect(host, port);