diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-09-05 13:17:45 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-09-05 13:17:45 +0200 |
commit | 65d91832bd0f6bf55bfefd1244582cec2e5139dc (patch) | |
tree | e8aa359587a3605a5c6fa79f0842321554449c0b /cpp/src/Ice/Instance.cpp | |
parent | JS minor fix, remove unused variables (diff) | |
download | ice-65d91832bd0f6bf55bfefd1244582cec2e5139dc.tar.bz2 ice-65d91832bd0f6bf55bfefd1244582cec2e5139dc.tar.xz ice-65d91832bd0f6bf55bfefd1244582cec2e5139dc.zip |
Added back to optmization to not call connection dispatch if not necessary
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index a223683cc6b..f4b0d89c90c 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -1531,6 +1531,7 @@ IceInternal::Instance::destroy() ThreadPoolPtr serverThreadPool; ThreadPoolPtr clientThreadPool; EndpointHostResolverPtr endpointHostResolver; + IceUtil::TimerPtr timer; { IceUtil::RecMutex::Lock sync(*this); @@ -1557,8 +1558,7 @@ IceInternal::Instance::destroy() if(_timer) { - _timer->destroy(); - _timer = 0; + std::swap(_timer, timer); } if(_servantFactoryManager) @@ -1610,6 +1610,10 @@ IceInternal::Instance::destroy() // // Join with the thread pool threads outside the synchronization. // + if(timer) + { + timer->destroy(); + } if(clientThreadPool) { clientThreadPool->joinWithAllThreads(); |