diff options
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r-- | cpp/src/Ice/ThreadPool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index 2cea6bbc1ef..21772e73b04 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -657,7 +657,7 @@ IceInternal::ThreadPool::run(const EventHandlerThreadPtr& thread) // If the handler called ioCompleted(), we re-enable the handler in // case it was disabled and we decrease the number of thread in use. // - if(_serialize) + if(_serialize && current._handler.get() != _workQueue.get()) { _selector.enable(current._handler.get(), current.operation); } @@ -893,7 +893,7 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current) if(!_destroyed) { - if(_serialize) + if(_serialize && current._handler.get() != _workQueue.get()) { _selector.disable(current._handler.get(), current.operation); } @@ -955,7 +955,7 @@ IceInternal::ThreadPool::ioCompleted(ThreadPoolCurrent& current) } } - return _serialize; + return _serialize && current._handler.get() != _workQueue.get(); } #if defined(ICE_USE_IOCP) || defined(ICE_OS_WINRT) |