summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/CHANGES6
-rw-r--r--cpp/demo/Ice/latency/config4
-rw-r--r--cpp/demo/Ice/throughput/config4
-rw-r--r--cpp/src/Ice/Instance.cpp3
-rw-r--r--cpp/src/Ice/ThreadPool.cpp7
5 files changed, 15 insertions, 9 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES
index 2c0e3366f9d..a229d0b3df5 100644
--- a/cpp/CHANGES
+++ b/cpp/CHANGES
@@ -1,6 +1,12 @@
Changes since version 1.2.0
---------------------------
+- The default thread pool size is now just one thread. This is the
+ fastest possible setting, still allows one level of nesting, and
+ doesn't require to make the servants thread safe. (Please see the
+ description of the thread pool properties in the manual for
+ information on how to increase the number of threads.)
+
- HP-UX port. See INSTALL.HP-UX.
- Added extra file integrity checks to IcePatch::Client.
diff --git a/cpp/demo/Ice/latency/config b/cpp/demo/Ice/latency/config
index 0a5b7b29511..0e05f54a78e 100644
--- a/cpp/demo/Ice/latency/config
+++ b/cpp/demo/Ice/latency/config
@@ -1,10 +1,6 @@
Latency.Ping=ping:default -p 10000
Latency.Endpoints=default -p 10000
-# For optimal performance, we use a thread pool of size 1.
-Ice.ThreadPool.Server.SizeMax=1
-Ice.ThreadPool.Server.Size=1
-
#Ice.Plugin.IceSSL=IceSSL:create
IceSSL.Client.CertPath=../../../certs
IceSSL.Client.Config=./sslconfig.xml
diff --git a/cpp/demo/Ice/throughput/config b/cpp/demo/Ice/throughput/config
index 1bb29726268..254e15b4d84 100644
--- a/cpp/demo/Ice/throughput/config
+++ b/cpp/demo/Ice/throughput/config
@@ -1,10 +1,6 @@
Throughput.Throughput=throughput:default -p 10000
Throughput.Endpoints=default -p 10000
-# For optimal performance, we use a thread pool of size 1.
-Ice.ThreadPool.Server.SizeMax=1
-Ice.ThreadPool.Server.Size=1
-
#Ice.Plugin.IceSSL=IceSSL:create
IceSSL.Client.CertPath=../../../certs
IceSSL.Client.Config=./sslconfig.xml
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;