summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.h
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-07-21 11:16:00 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-07-21 11:16:00 +0200
commit6a50ea5b6b2869925172a68bd3337f2f6832b8b5 (patch)
tree1c95012fcb155dbf92def98ed6a3c0280cc325b3 /cpp/src/Ice/ThreadPool.h
parentICE-5316 added pos method to BasicStream that works for both read/write (diff)
downloadice-6a50ea5b6b2869925172a68bd3337f2f6832b8b5.tar.bz2
ice-6a50ea5b6b2869925172a68bd3337f2f6832b8b5.tar.xz
ice-6a50ea5b6b2869925172a68bd3337f2f6832b8b5.zip
Fixed race condition which could cause request to be dispatched even if the connection was just put on hold
Diffstat (limited to 'cpp/src/Ice/ThreadPool.h')
-rw-r--r--cpp/src/Ice/ThreadPool.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h
index d8e0b85dcd1..b7dcbf3cf42 100644
--- a/cpp/src/Ice/ThreadPool.h
+++ b/cpp/src/Ice/ThreadPool.h
@@ -188,6 +188,11 @@ public:
{
_threadPool->finishMessage(const_cast<ThreadPoolCurrent&>(*this));
}
+#else
+ bool ioReady()
+ {
+ return _handler->_registered & operation;
+ }
#endif
void dispatchFromThisThread(const DispatchWorkItemPtr& workItem)
@@ -276,7 +281,7 @@ public:
operator bool()
{
- return true;
+ return _message._current.ioReady(); // Ensure the handler is still interested in the operation.
}
void completed()