summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r--cpp/src/Ice/ThreadPool.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 14124f4e1a5..4a09bf995c0 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -154,16 +154,10 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance) :
_minFd = _fdIntrRead;
_timeout = atoi(_instance->properties()->getProperty("Ice.ServerIdleTime").c_str());
-
- _threadNum = 10;
- string value = _instance->properties()->getProperty("Ice.ThreadPool.Size");
- if (!value.empty())
+ _threadNum = atoi(_instance->properties()->getPropertyWithDefault("Ice.ThreadPool.Size", "10").c_str());
+ if (_threadNum < 1)
{
- _threadNum = atoi(value.c_str());
- if (_threadNum < 1)
- {
- _threadNum = 1;
- }
+ _threadNum = 1;
}
try