summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-06-27 10:48:31 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-06-27 10:48:31 +0000
commit144e9fe4e514ae4c1fe3bdc877a00d4787be31c9 (patch)
tree0cdd29a7145dfc049efd01474cafeea03567008b /cpp/src/Ice/ThreadPool.cpp
parentFixed bug 710 & 1139 (diff)
downloadice-144e9fe4e514ae4c1fe3bdc877a00d4787be31c9.tar.bz2
ice-144e9fe4e514ae4c1fe3bdc877a00d4787be31c9.tar.xz
ice-144e9fe4e514ae4c1fe3bdc877a00d4787be31c9.zip
Fixed bug 710
Diffstat (limited to 'cpp/src/Ice/ThreadPool.cpp')
-rw-r--r--cpp/src/Ice/ThreadPool.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index bf2287b9516..03a762bf3f1 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -68,7 +68,7 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
if(size < 1)
{
Warning out(_instance->initializationData().logger);
- out << _prefix << ".Size < 0; Size adjusted to 1";
+ out << _prefix << ".Size < 1; Size adjusted to 1";
size = 1;
}
@@ -83,28 +83,11 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p
int sizeWarn = _instance->initializationData().properties->
getPropertyAsIntWithDefault(_prefix + ".SizeWarn", sizeMax * 80 / 100);
- if(!_instance->initializationData().properties->getProperty(_prefix + ".SizeWarn").empty())
+ if(sizeWarn > sizeMax)
{
- if(sizeWarn < size)
- {
- Warning out(_instance->initializationData().logger);
- out << _prefix << ".SizeWarn < " << _prefix << ".Size; adjusted SizeWarn to Size (" << size << ")";
- }
- else if(sizeWarn > sizeMax)
- {
- Warning out(_instance->initializationData().logger);
- out << _prefix << ".SizeWarn > " << _prefix << ".SizeMax; adjusted SizeWarn to SizeMax (" << sizeMax << ")";
- }
- }
-
- //
- // We do this deliberately outside the above test, because sizeMax * 80 / 100
- // can evaluate to something < size, but we want to issue a warning only if
- // SizeWarn was explicitly set.
- //
- if(sizeWarn < size)
- {
- sizeWarn = size;
+ Warning out(_instance->initializationData().logger);
+ out << _prefix << ".SizeWarn > " << _prefix << ".SizeMax; adjusted SizeWarn to SizeMax (" << sizeMax << ")";
+ sizeWarn = sizeMax;
}
const_cast<int&>(_size) = size;