summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Glacier2/Blobject.cpp6
-rw-r--r--cpp/src/Glacier2/RequestQueue.cpp7
2 files changed, 8 insertions, 5 deletions
diff --git a/cpp/src/Glacier2/Blobject.cpp b/cpp/src/Glacier2/Blobject.cpp
index d26a961841e..29b7fc382bb 100644
--- a/cpp/src/Glacier2/Blobject.cpp
+++ b/cpp/src/Glacier2/Blobject.cpp
@@ -60,6 +60,12 @@ Glacier2::Blobject::Blobject(const CommunicatorPtr& communicator, bool reverse)
Int threadStackSize = _properties->getPropertyAsInt("Ice.ThreadPerConnection.StackSize");
_requestQueue->start(static_cast<size_t>(threadStackSize));
+
+ //
+ // See the comment in Glacier2::RequestQueue::destroy()
+ // for why we detach the thread.
+ //
+ _requestQueue->getThreadControl().detach();
}
catch(const IceUtil::Exception& ex)
{
diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp
index 39064513d0e..0f3043d9495 100644
--- a/cpp/src/Glacier2/RequestQueue.cpp
+++ b/cpp/src/Glacier2/RequestQueue.cpp
@@ -145,13 +145,10 @@ Glacier2::RequestQueue::destroy()
// We don't want to wait for the RequestQueue thread, because this
// destroy() operation is called when sessions expire or are
// destroyed, in which case we do not want the session handler
- // thread to block here.
+ // thread to block here. Therefore we don't call join(), but
+ // instead detach the thread right after we start it.
//
//getThreadControl().join();
- if(getThreadControl().isAlive())
- {
- getThreadControl().detach();
- }
}
bool