You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2009/06/03 15:52:38 UTC

svn commit: r781375 - /qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp

Author: astitcher
Date: Wed Jun  3 13:52:37 2009
New Revision: 781375

URL: http://svn.apache.org/viewvc?rev=781375&view=rev
Log:
Revert "Change client io threading to be initialised at first use"

This reverts commit 2e77e9b85912ccbfd29763710a973d0bbff9c684.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp?rev=781375&r1=781374&r2=781375&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp Wed Jun  3 13:52:37 2009
@@ -130,10 +130,7 @@
     }
 };
 
-IOThread& theIO() {
-    static IOThread io(SystemInfo::concurrency());
-    return io;
-}
+static IOThread io(SystemInfo::concurrency());
 
 class HeartbeatTask : public TimerTask {
     TimeoutHandler& timeout;
@@ -176,7 +173,7 @@
     // 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 @@
     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);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org