From 006580b9a7454263b50ca9290edebeb674e3779f Mon Sep 17 00:00:00 2001 From: Joe George Date: Fri, 27 Sep 2024 11:29:21 -0400 Subject: [PATCH] Remove un-used C++ thread pool properties (#2804) [name].ThreadPool.ThreadPriority [name].ThreadPool.StackSize Ice.ThreadPriority --- config/PropertyNames.xml | 5 +--- cpp/src/Ice/ObjectAdapterI.cpp | 4 +-- cpp/src/Ice/PropertyNames.cpp | 3 +- cpp/src/Ice/PropertyNames.h | 2 +- cpp/src/Ice/ThreadPool.cpp | 29 ------------------- cpp/src/Ice/ThreadPool.h | 3 -- csharp/src/Ice/Internal/PropertyNames.cs | 2 +- .../java/com/zeroc/Ice/PropertyNames.java | 2 +- js/src/Ice/PropertyNames.js | 2 +- 9 files changed, 7 insertions(+), 45 deletions(-) diff --git a/config/PropertyNames.xml b/config/PropertyNames.xml index 3558e468e1b..7782337aa50 100644 --- a/config/PropertyNames.xml +++ b/config/PropertyNames.xml @@ -218,11 +218,9 @@ generated from the section label. - - @@ -313,8 +311,7 @@ generated from the section label. - - + diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index d9f4c28975d..caa7792342d 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -1439,9 +1439,7 @@ Ice::ObjectAdapterI::filterProperties(StringSeq& unknownProps) "ThreadPool.Size", "ThreadPool.SizeMax", "ThreadPool.SizeWarn", - "ThreadPool.StackSize", - "ThreadPool.ThreadIdleTime", - "ThreadPool.ThreadPriority"}; + "ThreadPool.ThreadIdleTime"}; // // Do not create unknown properties list if Ice prefix, ie Ice, Glacier2, etc diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index 9c608eb786a..d86df42879a 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Thu Sep 26 14:57:25 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -140,7 +140,6 @@ const IceInternal::Property IcePropsData[] = IceInternal::Property("Ice.ThreadPool.Server.SizeWarn", false, "0", false), IceInternal::Property("Ice.ThreadPool.Server.Serialize", false, "0", false), IceInternal::Property("Ice.ThreadPool.Server.ThreadIdleTime", false, "60", false), - IceInternal::Property("Ice.ThreadPriority", false, "", false), IceInternal::Property("Ice.ToStringMode", false, "Unicode", false), IceInternal::Property("Ice.Trace.Admin.Properties", false, "0", false), IceInternal::Property("Ice.Trace.Admin.Logger", false, "0", false), diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index 154b4498ab2..e3965deec8e 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Thu Sep 26 14:57:25 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index b5dfc86333b..3937fc5e5fb 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -158,11 +158,8 @@ IceInternal::ThreadPool::ThreadPool(const InstancePtr& instance, const string& p _sizeMax(0), _sizeWarn(0), _serialize(_instance->initializationData().properties->getPropertyAsInt(_prefix + ".Serialize") > 0), - _hasPriority(false), - _priority(0), _serverIdleTime(timeout), _threadIdleTime(0), - _stackSize(0), _inUse(0), #if !defined(ICE_USE_IOCP) _inUseIO(0), @@ -254,32 +251,6 @@ IceInternal::ThreadPool::initialize() _selector.setup(_sizeIO); #endif -#if defined(__APPLE__) - // - // We use a default stack size of 1MB on macOS. The C++ mapping allows transmitting - // class graphs with a depth of 100 (maximum default), 512KB is not enough otherwise. - // - int defaultStackSize = 1024 * 1024; // 1MB -#else - int defaultStackSize = 0; -#endif - int stackSize = properties->getPropertyAsIntWithDefault(_prefix + ".StackSize", defaultStackSize); - if (stackSize < 0) - { - Warning out(_instance->initializationData().logger); - out << _prefix << ".StackSize < 0; Size adjusted to OS default"; - stackSize = 0; - } - const_cast(_stackSize) = static_cast(stackSize); - - const_cast(_hasPriority) = properties->getProperty(_prefix + ".ThreadPriority") != ""; - const_cast(_priority) = properties->getPropertyAsInt(_prefix + ".ThreadPriority"); - if (!_hasPriority) - { - const_cast(_hasPriority) = properties->getProperty("Ice.ThreadPriority") != ""; - const_cast(_priority) = properties->getPropertyAsInt("Ice.ThreadPriority"); - } - _workQueue = make_shared(*this); _selector.initialize(_workQueue.get()); diff --git a/cpp/src/Ice/ThreadPool.h b/cpp/src/Ice/ThreadPool.h index f421ee07a92..82173eb7122 100644 --- a/cpp/src/Ice/ThreadPool.h +++ b/cpp/src/Ice/ThreadPool.h @@ -117,11 +117,8 @@ namespace IceInternal const int _sizeMax; // Maximum number of threads. const int _sizeWarn; // If _inUse reaches _sizeWarn, a "low on threads" warning will be printed. const bool _serialize; // True if requests need to be serialized over the connection. - const bool _hasPriority; - const int _priority; const int _serverIdleTime; const int _threadIdleTime; - const size_t _stackSize; std::set _threads; // All threads, running or not. int _inUse; // Number of threads that are currently in use. diff --git a/csharp/src/Ice/Internal/PropertyNames.cs b/csharp/src/Ice/Internal/PropertyNames.cs index b0c7d5a52a5..775519c1990 100644 --- a/csharp/src/Ice/Internal/PropertyNames.cs +++ b/csharp/src/Ice/Internal/PropertyNames.cs @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Thu Sep 26 14:57:25 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/java/src/Ice/src/main/java/com/zeroc/Ice/PropertyNames.java b/java/src/Ice/src/main/java/com/zeroc/Ice/PropertyNames.java index 7e1c9c082d5..56940e85548 100644 --- a/java/src/Ice/src/main/java/com/zeroc/Ice/PropertyNames.java +++ b/java/src/Ice/src/main/java/com/zeroc/Ice/PropertyNames.java @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Thu Sep 26 14:57:25 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/js/src/Ice/PropertyNames.js b/js/src/Ice/PropertyNames.js index 00b7a2329c2..f0a68dc3906 100644 --- a/js/src/Ice/PropertyNames.js +++ b/js/src/Ice/PropertyNames.js @@ -1,6 +1,6 @@ // Copyright (c) ZeroC, Inc. -// Generated by makeprops.py from PropertyNames.xml, Thu Sep 26 14:57:25 2024 +// Generated by makeprops.py from PropertyNames.xml, Fri Sep 27 11:15:19 2024 // IMPORTANT: Do not edit this file -- any edits made here will be lost!