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.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp
index 584c08f209e..18d87f54159 100644
--- a/cpp/src/Ice/ThreadPool.cpp
+++ b/cpp/src/Ice/ThreadPool.cpp
@@ -21,6 +21,7 @@
#include <Ice/Functional.h>
#include <Ice/Protocol.h>
#include <Ice/ObjectAdapterFactory.h>
+#include <Ice/Properties.h>
using namespace std;
using namespace Ice;
@@ -29,7 +30,7 @@ using namespace IceInternal;
void IceInternal::incRef(ThreadPool* p) { p->__incRef(); }
void IceInternal::decRef(ThreadPool* p) { p->__decRef(); }
-IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, int threadNum, int timeout) :
+IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& prefix, int timeout) :
_instance(instance),
_destroyed(false),
_lastFd(INVALID_SOCKET),
@@ -47,9 +48,12 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, int threadNum,
_maxFd = _fdIntrRead;
_minFd = _fdIntrRead;
+ int threadNum = _instance->properties()->getPropertyAsInt(prefix + ".Size");
+
if(threadNum < 1)
{
threadNum = 1;
+ _instance->properties()->setProperty(prefix + ".Size", "1");
}
if(threadNum > 1)