summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2015-08-11 10:42:04 +0200
committerBenoit Foucher <benoit@zeroc.com>2015-08-11 10:42:04 +0200
commit12f8959ad8d0843a55dd309f087dd1f8a5dda88f (patch)
tree5186165ce0e0b4bb432a9e70314e597563bb8c56 /cpp/src/Ice/ThreadPool.cpp
parentUpdates branch description (diff)
downloadice-12f8959ad8d0843a55dd309f087dd1f8a5dda88f.tar.bz2
ice-12f8959ad8d0843a55dd309f087dd1f8a5dda88f.tar.xz
ice-12f8959ad8d0843a55dd309f087dd1f8a5dda88f.zip
Fixed ICE-6695, Ice for WinRT hang on Windows 10
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r--cpp/src/Ice/ThreadPool.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index f7c25cc20f4..7ff3f57db4b 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -597,7 +597,7 @@ IceInternal::ThreadPool::finish(const EventHandlerPtr& handler, bool closeNow)
return closeNow;
#else
// If there are no pending asynchronous operations, we can call finish on the handler now.
- if(!handler->_pending)
+ if(!(handler->_pending & SocketOperationWaitForClose))
{
_workQueue->queue(new FinishedWorkItem(handler, false));
_selector.finish(handler.get());
@@ -1103,7 +1103,7 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current)
if(!current._handler->finishAsync(current.operation)) // Returns false if the handler is finished.
{
current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
- if(!current._handler->_pending && current._handler->_finish)
+ if(!(current._handler->_pending & SocketOperationWaitForClose) && current._handler->_finish)
{
_workQueue->queue(new FinishedWorkItem(current._handler, false));
_selector.finish(current._handler.get());
@@ -1117,7 +1117,7 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current)
if(!current._handler->startAsync(current.operation))
{
current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
- if(!current._handler->_pending && current._handler->_finish)
+ if(!(current._handler->_pending & SocketOperationWaitForClose) && current._handler->_finish)
{
_workQueue->queue(new FinishedWorkItem(current._handler, false));
_selector.finish(current._handler.get());
@@ -1140,7 +1140,7 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current)
else
{
current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
- if(!current._handler->_pending && current._handler->_finish)
+ if(!(current._handler->_pending & SocketOperationWaitForClose) && current._handler->_finish)
{
_workQueue->queue(new FinishedWorkItem(current._handler, false));
_selector.finish(current._handler.get());
@@ -1170,7 +1170,7 @@ IceInternal::ThreadPool::finishMessage(ThreadPoolCurrent& current)
current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation);
}
- if(!current._handler->_pending && current._handler->_finish)
+ if(!(current._handler->_pending & SocketOperationWaitForClose) && current._handler->_finish)
{
// There are no more pending async operations, it's time to call finish.
_workQueue->queue(new FinishedWorkItem(current._handler, false));