summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 3b32c71d510..06c1148d161 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -207,6 +207,22 @@ IceInternal::Instance::clientThreadPool()
if(!_clientThreadPool) // Lazy initialization.
{
+ //
+ // Make sure that the client thread pool defaults are correctly
+ //
+ if(_properties->getProperty("Ice.ThreadPool.Client.Size").empty())
+ {
+ _properties->setProperty("Ice.ThreadPool.Client.Size", "1");
+ }
+ if(_properties->getProperty("Ice.ThreadPool.Client.SizeMax").empty())
+ {
+ _properties->setProperty("Ice.ThreadPool.Client.SizeMax", "1");
+ }
+ if(_properties->getProperty("Ice.ThreadPool.Client.SizeWarn").empty())
+ {
+ _properties->setProperty("Ice.ThreadPool.Client.SizeWarn", "0");
+ }
+
_clientThreadPool = new ThreadPool(this, "Ice.ThreadPool.Client", 0);
}
@@ -222,13 +238,6 @@ IceInternal::Instance::serverThreadPool()
if(!_serverThreadPool) // Lazy initialization.
{
- //
- // Make sure that the server thread pool default is set
- // correctly.
- //
- _properties->setProperty("Ice.ThreadPool.Server.Size",
- _properties->getPropertyWithDefault("Ice.ThreadPool.Server.Size", "10"));
-
int timeout = _properties->getPropertyAsInt("Ice.ServerIdleTime");
_serverThreadPool = new ThreadPool(this, "Ice.ThreadPool.Server", timeout);
}