diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-06-01 15:31:11 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-06-01 15:31:11 +0000 |
commit | dba48e6aa9feac17c9ee2c02adb90a01c9ebae8e (patch) | |
tree | 1f890a3a36238d21c10bb7adba0dc979c2905689 /cpp/src | |
parent | Added a bunch of missing dependencies on Glacier2 to a few IceGrid (diff) | |
download | ice-dba48e6aa9feac17c9ee2c02adb90a01c9ebae8e.tar.bz2 ice-dba48e6aa9feac17c9ee2c02adb90a01c9ebae8e.tar.xz ice-dba48e6aa9feac17c9ee2c02adb90a01c9ebae8e.zip |
Added thread start/stop hooks
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 10 | ||||
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 10 |
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. } |