summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ConnectionI.cpp10
-rw-r--r--cpp/src/Ice/ThreadPool.cpp10
2 files changed, 20 insertions, 0 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index b23e628466d..2a5ca75f12e 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -2572,6 +2572,11 @@ Ice::ConnectionI::ThreadPerConnection::ThreadPerConnection(const ConnectionIPtr&
void
Ice::ConnectionI::ThreadPerConnection::run()
{
+ if(_connection->_instance->initializationData().threadHook)
+ {
+ _connection->_instance->initializationData().threadHook->start();
+ }
+
try
{
_connection->run();
@@ -2592,5 +2597,10 @@ Ice::ConnectionI::ThreadPerConnection::run()
out << "unknown exception in thread per connection:\n" << _connection->toString();
}
+ if(_connection->_instance->initializationData().threadHook)
+ {
+ _connection->_instance->initializationData().threadHook->stop();
+ }
+
_connection = 0; // Resolve cyclic dependency.
}
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 4d291161fbd..0bb280f8037 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -851,6 +851,11 @@ IceInternal::ThreadPool::EventHandlerThread::EventHandlerThread(const ThreadPool
void
IceInternal::ThreadPool::EventHandlerThread::run()
{
+ if(_pool->_instance->initializationData().threadHook)
+ {
+ _pool->_instance->initializationData().threadHook->start();
+ }
+
bool promote;
try
@@ -890,5 +895,10 @@ IceInternal::ThreadPool::EventHandlerThread::run()
}
}
+ if(_pool->_instance->initializationData().threadHook)
+ {
+ _pool->_instance->initializationData().threadHook->stop();
+ }
+
_pool = 0; // Break cyclic dependency.
}