summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2004-01-24 18:22:58 +0000
committerMarc Laukien <marc@zeroc.com>2004-01-24 18:22:58 +0000
commit34254149e244f71423dcbecec3192a55c5396ee7 (patch)
tree8dfd02d927d102e0806706d65551934b67c802c4 /cpp/src
parentfix (diff)
downloadice-34254149e244f71423dcbecec3192a55c5396ee7.tar.bz2
ice-34254149e244f71423dcbecec3192a55c5396ee7.tar.xz
ice-34254149e244f71423dcbecec3192a55c5396ee7.zip
default thread pool size is now 1
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/Instance.cpp3
-rw-r--r--cpp/src/Ice/ThreadPool.cpp7
2 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index e9e29f8d68b..6e674643492 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -275,6 +275,8 @@ IceInternal::Instance::clientThreadPool()
if(!_clientThreadPool) // Lazy initialization.
{
+// Not necessary anymore, this is now the default for every thread pool
+/*
//
// Make sure that the client thread pool defaults are correctly
//
@@ -290,6 +292,7 @@ IceInternal::Instance::clientThreadPool()
{
_properties->setProperty("Ice.ThreadPool.Client.SizeWarn", "0");
}
+*/
_clientThreadPool = new ThreadPool(this, "Ice.ThreadPool.Client", 0);
}
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 687d0787a84..ace4a8aefa9 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -57,7 +57,12 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
_maxFd = _fdIntrRead;
_minFd = _fdIntrRead;
- int size = _instance->properties()->getPropertyAsIntWithDefault(_prefix + ".Size", 5);
+ //
+ // We use just one thread as the default. This is the fastest
+ // possible setting, still allows one level of nesting, and
+ // doesn't require to make the servants thread safe.
+ //
+ int size = _instance->properties()->getPropertyAsIntWithDefault(_prefix + ".Size", 1);
if(size < 1)
{
size = 1;