summaryrefslogtreecommitdiff
path: root/qpid/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
commit6b8d020b8e3f96ebd15846ec9a0363533e6c1ef8 (patch)
treef289608a3a1a2c12db74c888aefdec6f0a12b421 /qpid/cpp
parentcc2a09e8fb6fadde25cdc0a010588131fb5fd2f6 (diff)
downloadqpid-python-6b8d020b8e3f96ebd15846ec9a0363533e6c1ef8.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@781375 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/client/ConnectionImpl.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
index 2fdf4d1d25..ccaa8c0b87 100644
--- a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
+++ b/qpid/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);