diff options
author | Joe George <joe@zeroc.com> | 2019-05-07 10:51:58 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2019-05-07 11:12:17 -0400 |
commit | 0199db0b81df4a37fe63069a9fc75e13d880e967 (patch) | |
tree | 48901929000d768d85f0eb350c60e99e962e4d38 /cpp/src/Ice/ThreadPool.h | |
parent | Regenerate Xcode projects (diff) | |
download | ice-0199db0b81df4a37fe63069a9fc75e13d880e967.tar.bz2 ice-0199db0b81df4a37fe63069a9fc75e13d880e967.tar.xz ice-0199db0b81df4a37fe63069a9fc75e13d880e967.zip |
Dispatch queue updates
- Remove dispatch queues from Swift APIs
- Create dispatch queue in C++ thread pool (ICE_SWIFT only)
Diffstat (limited to 'cpp/src/Ice/ThreadPool.h')
-rw-r--r-- | cpp/src/Ice/ThreadPool.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index f9641296a14..daff7373f1a 100644 --- a/cpp/src/Ice/ThreadPool.h +++ b/cpp/src/Ice/ThreadPool.h @@ -110,6 +110,10 @@ public: std::string prefix() const; +#ifdef ICE_SWIFT + dispatch_queue_t getDispatchQueue() const; +#endif + private: void run(const EventHandlerThreadPtr&); @@ -127,10 +131,14 @@ private: std::string nextThreadId(); const InstancePtr _instance; -#ifdef ICE_CPP11_MAPPING +#ifdef ICE_SWIFT + const dispatch_queue_t _dispatchQueue; +#else // Ice for Swift does not support a dispatcher +# ifdef ICE_CPP11_MAPPING std::function<void(std::function<void()>, const std::shared_ptr<Ice::Connection>&)> _dispatcher; -#else +# else const Ice::DispatcherPtr _dispatcher; +# endif #endif ThreadPoolWorkQueuePtr _workQueue; bool _destroyed; |