diff options
author | Joe George <joe@zeroc.com> | 2019-06-27 11:18:11 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2019-06-27 11:18:11 -0400 |
commit | 5502c05d56e5120b2337a64fc0431b714941c6c9 (patch) | |
tree | 5b20cc56fe3581ad1c5d7c54736b9c1c10073c9c /cpp/src/Ice/ConnectionI.cpp | |
parent | Fix slice2swift build failure (diff) | |
download | ice-5502c05d56e5120b2337a64fc0431b714941c6c9.tar.bz2 ice-5502c05d56e5120b2337a64fc0431b714941c6c9.tar.xz ice-5502c05d56e5120b2337a64fc0431b714941c6c9.zip |
Fix issue where DispatchQueue was not always used
Diffstat (limited to 'cpp/src/Ice/ConnectionI.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index 176848c84f8..413a5d8775f 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -1835,6 +1835,12 @@ Ice::ConnectionI::message(ThreadPoolCurrent& current) } } +// dispatchFromThisThread dispatches to the correct DispatchQueue +#ifdef ICE_SWIFT + _threadPool->dispatchFromThisThread(new DispatchCall(ICE_SHARED_FROM_THIS, startCB, sentCBs, compress, requestId, + invokeNum, servantManager, adapter, outAsync, + heartbeatCallback, current.stream)); +#else if(!_dispatcher) // Optimization, call dispatch() directly if there's no dispatcher. { dispatch(startCB, sentCBs, compress, requestId, invokeNum, servantManager, adapter, outAsync, heartbeatCallback, @@ -1847,6 +1853,7 @@ Ice::ConnectionI::message(ThreadPoolCurrent& current) heartbeatCallback, current.stream)); } +#endif } void @@ -1998,6 +2005,11 @@ Ice::ConnectionI::finished(ThreadPoolCurrent& current, bool close) } current.ioCompleted(); + +// dispatchFromThisThread dispatches to the correct DispatchQueue +#ifdef ICE_SWIFT + _threadPool->dispatchFromThisThread(new FinishCall(ICE_SHARED_FROM_THIS, close)); +#else if(!_dispatcher) // Optimization, call finish() directly if there's no dispatcher. { finish(close); @@ -2006,6 +2018,7 @@ Ice::ConnectionI::finished(ThreadPoolCurrent& current, bool close) { _threadPool->dispatchFromThisThread(new FinishCall(ICE_SHARED_FROM_THIS, close)); } +#endif } void |