summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2019-05-07 14:05:05 -0400
committerJoe George <joe@zeroc.com>2019-05-07 14:05:05 -0400
commit22dc88b4ab9bcd4a2763fad61f38bb834b0ceb35 (patch)
treebfb5864b02158d1efc838f5d56facb65243fc555 /cpp/src
parentDispatch queue updates (diff)
downloadice-22dc88b4ab9bcd4a2763fad61f38bb834b0ceb35.tar.bz2
ice-22dc88b4ab9bcd4a2763fad61f38bb834b0ceb35.tar.xz
ice-22dc88b4ab9bcd4a2763fad61f38bb834b0ceb35.zip
More dispatch queue fixes
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/CommunicatorI.cpp4
-rw-r--r--cpp/src/Ice/CommunicatorI.h4
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp6
-rw-r--r--cpp/src/Ice/ObjectAdapterI.h2
-rw-r--r--cpp/src/Ice/ThreadPool.cpp4
-rw-r--r--cpp/src/Ice/ThreadPool.h2
6 files changed, 13 insertions, 9 deletions
diff --git a/cpp/src/Ice/CommunicatorI.cpp b/cpp/src/Ice/CommunicatorI.cpp
index 4355ad80977..a23570870f1 100644
--- a/cpp/src/Ice/CommunicatorI.cpp
+++ b/cpp/src/Ice/CommunicatorI.cpp
@@ -384,13 +384,13 @@ Ice::CommunicatorI::getValueFactoryManager() const ICE_NOEXCEPT
#ifdef ICE_SWIFT
dispatch_queue_t
-Ice::CommunicatorI::getClientDispatchQueue() const ICE_NOEXCEPT
+Ice::CommunicatorI::getClientDispatchQueue() const
{
return _instance->clientThreadPool()->getDispatchQueue();
}
dispatch_queue_t
-Ice::CommunicatorI::getServerDispatchQueue() const ICE_NOEXCEPT
+Ice::CommunicatorI::getServerDispatchQueue() const
{
return _instance->serverThreadPool()->getDispatchQueue();
}
diff --git a/cpp/src/Ice/CommunicatorI.h b/cpp/src/Ice/CommunicatorI.h
index ae0f4e817c8..3e24479691e 100644
--- a/cpp/src/Ice/CommunicatorI.h
+++ b/cpp/src/Ice/CommunicatorI.h
@@ -98,8 +98,8 @@ public:
virtual ValueFactoryManagerPtr getValueFactoryManager() const ICE_NOEXCEPT;
#ifdef ICE_SWIFT
- virtual dispatch_queue_t getClientDispatchQueue() const ICE_NOEXCEPT;
- virtual dispatch_queue_t getServerDispatchQueue() const ICE_NOEXCEPT;
+ virtual dispatch_queue_t getClientDispatchQueue() const;
+ virtual dispatch_queue_t getServerDispatchQueue() const;
#endif
#ifdef ICE_CPP11_MAPPING
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index 102636af70d..69c25758483 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -737,8 +737,12 @@ Ice::ObjectAdapterI::setPublishedEndpoints(const EndpointSeq& newEndpoints)
#ifdef ICE_SWIFT
dispatch_queue_t
-Ice::ObjectAdapterI::getDispatchQueue() const ICE_NOEXCEPT
+Ice::ObjectAdapterI::getDispatchQueue() const
{
+ IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
+
+ checkForDeactivation();
+
return getThreadPool()->getDispatchQueue();
}
#endif
diff --git a/cpp/src/Ice/ObjectAdapterI.h b/cpp/src/Ice/ObjectAdapterI.h
index 00496d9133d..c4676186ce6 100644
--- a/cpp/src/Ice/ObjectAdapterI.h
+++ b/cpp/src/Ice/ObjectAdapterI.h
@@ -86,7 +86,7 @@ public:
virtual void setPublishedEndpoints(const EndpointSeq&);
#ifdef ICE_SWIFT
- virtual dispatch_queue_t getDispatchQueue() const ICE_NOEXCEPT;
+ virtual dispatch_queue_t getDispatchQueue() const;
#endif
bool isLocal(const ObjectPrxPtr&) const;
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 2994f292d86..7ffb9016a1e 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -246,7 +246,7 @@ IceInternal::ThreadPoolWorkQueue::getNativeInfo()
IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& prefix, int timeout) :
_instance(instance),
#ifdef ICE_SWIFT
- _dispatchQueue(dispatch_queue_create(prefix.c_str(), DISPATCH_QUEUE_CONCURRENT)),
+ _dispatchQueue(dispatch_queue_create(("com.zeroc." + prefix).c_str(), DISPATCH_QUEUE_CONCURRENT)),
#else
_dispatcher(_instance->initializationData().dispatcher),
#endif
@@ -620,7 +620,7 @@ IceInternal::ThreadPool::prefix() const
#ifdef ICE_SWIFT
dispatch_queue_t
-IceInternal::ThreadPool::getDispatchQueue() const
+IceInternal::ThreadPool::getDispatchQueue() const ICE_NOEXCEPT
{
return _dispatchQueue;
}
diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h
index daff7373f1a..1b6bf254467 100644
--- a/cpp/src/Ice/ThreadPool.h
+++ b/cpp/src/Ice/ThreadPool.h
@@ -111,7 +111,7 @@ public:
std::string prefix() const;
#ifdef ICE_SWIFT
- dispatch_queue_t getDispatchQueue() const;
+ dispatch_queue_t getDispatchQueue() const ICE_NOEXCEPT;
#endif
private: