summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-02-14 04:16:37 +0000
committerMarc Laukien <marc@zeroc.com>2002-02-14 04:16:37 +0000
commit0f6931918a5fe32cd90fb9f599682838f48cb716 (patch)
tree3201933dcf9691bffd803ed0116895dbf5645d8a /cpp/src/Ice/ThreadPool.cpp
parentRemoved file that shouldn't be present until after merging FreezeXML (diff)
downloadice-0f6931918a5fe32cd90fb9f599682838f48cb716.tar.bz2
ice-0f6931918a5fe32cd90fb9f599682838f48cb716.tar.xz
ice-0f6931918a5fe32cd90fb9f599682838f48cb716.zip
fixes, simplifications
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