summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-01-25 16:50:20 +0000
committerMark Spruiell <mes@zeroc.com>2007-01-25 16:50:20 +0000
commit2af1be4b75d36ed2022c304c9030ff34162d44db (patch)
tree229182241b85b3dd9b57cf56a02e774b83fcd47a /cpp/src/Ice/Instance.cpp
parentIceGrid file cache fixes (diff)
downloadice-2af1be4b75d36ed2022c304c9030ff34162d44db.tar.bz2
ice-2af1be4b75d36ed2022c304c9030ff34162d44db.tar.xz
ice-2af1be4b75d36ed2022c304c9030ff34162d44db.zip
adding thread-per-connection settings for proxies & OAs
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index b6a13245d53..5548d792c9b 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -232,7 +232,7 @@ IceInternal::Instance::serverThreadPool()
return _serverThreadPool;
}
-int
+bool
IceInternal::Instance::threadPerConnection() const
{
// No mutex lock, immutable.
@@ -457,7 +457,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
_messageSizeMax(0),
_clientACM(0),
_serverACM(0),
- _threadPerConnection(0),
+ _threadPerConnection(false),
_threadPerConnectionStackSize(0),
_defaultContext(new SharedContext),
_implicitContext(0)
@@ -624,18 +624,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
const_cast<Int&>(_clientACM) = _initData.properties->getPropertyAsIntWithDefault("Ice.ACM.Client", 60);
const_cast<Int&>(_serverACM) = _initData.properties->getPropertyAsInt("Ice.ACM.Server");
- {
- Int threadPerConnection = _initData.properties->getPropertyAsInt("Ice.ThreadPerConnection");
- if(threadPerConnection < 0)
- {
- threadPerConnection = 0;
- }
- if(threadPerConnection > 2)
- {
- threadPerConnection = 2;
- }
- const_cast<Int&>(_threadPerConnection) = threadPerConnection;
- }
+ const_cast<bool&>(_threadPerConnection) = _initData.properties->getPropertyAsInt("Ice.ThreadPerConnection") > 0;
{
Int stackSize = _initData.properties->getPropertyAsInt("Ice.ThreadPerConnection.StackSize");