summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ThreadPool.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2003-03-06 23:16:32 +0000
committerMarc Laukien <marc@zeroc.com>2003-03-06 23:16:32 +0000
commit22a1dff9132fef952d43c8f08f86113b3fb3a783 (patch)
treee155d116a4b43a4f3005d1672601cb43fc60b35f /cpp/src/Ice/ThreadPool.cpp
parentadd --Ice.Config to usage (diff)
downloadice-22a1dff9132fef952d43c8f08f86113b3fb3a783.tar.bz2
ice-22a1dff9132fef952d43c8f08f86113b3fb3a783.tar.xz
ice-22a1dff9132fef952d43c8f08f86113b3fb3a783.zip
internal thread pool changes
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)