This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 4a7722a90dca22c6113907ecb2420cd9fa0a4678 Author: lihan <aooo...@gmail.com> AuthorDate: Sun May 8 19:32:59 2022 +0800 Remove meaningless code --- .../org/apache/catalina/core/StandardThreadExecutor.java | 16 ---------------- webapps/docs/config/executor.xml | 4 ---- 2 files changed, 20 deletions(-) diff --git a/java/org/apache/catalina/core/StandardThreadExecutor.java b/java/org/apache/catalina/core/StandardThreadExecutor.java index 2c714efedc..7f926108c8 100644 --- a/java/org/apache/catalina/core/StandardThreadExecutor.java +++ b/java/org/apache/catalina/core/StandardThreadExecutor.java @@ -74,11 +74,6 @@ public class StandardThreadExecutor extends LifecycleMBeanBase */ protected String name; - /** - * prestart threads? - */ - protected boolean prestartminSpareThreads = false; - /** * The maximum number of elements that can queue up before we reject them */ @@ -121,9 +116,6 @@ public class StandardThreadExecutor extends LifecycleMBeanBase TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority()); executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf); executor.setThreadRenewalDelay(threadRenewalDelay); - if (prestartminSpareThreads) { - executor.prestartAllCoreThreads(); - } taskqueue.setParent(executor); setState(LifecycleState.STARTING); @@ -203,10 +195,6 @@ public class StandardThreadExecutor extends LifecycleMBeanBase return name; } - public boolean isPrestartminSpareThreads() { - - return prestartminSpareThreads; - } public void setThreadPriority(int threadPriority) { this.threadPriority = threadPriority; } @@ -240,10 +228,6 @@ public class StandardThreadExecutor extends LifecycleMBeanBase } } - public void setPrestartminSpareThreads(boolean prestartminSpareThreads) { - this.prestartminSpareThreads = prestartminSpareThreads; - } - public void setName(String name) { this.name = name; } diff --git a/webapps/docs/config/executor.xml b/webapps/docs/config/executor.xml index b896a91587..05b1420b8e 100644 --- a/webapps/docs/config/executor.xml +++ b/webapps/docs/config/executor.xml @@ -107,10 +107,6 @@ <p>(int) The maximum number of runnable tasks that can queue up awaiting execution before we reject them. Default value is <code>Integer.MAX_VALUE</code></p> </attribute> - <attribute name="prestartminSpareThreads" required="false"> - <p>(boolean) Whether minSpareThreads should be started when starting the Executor or not, - the default is <code>false</code></p> - </attribute> <attribute name="threadRenewalDelay" required="false"> <p>(long) If a <a href="listeners.html">ThreadLocalLeakPreventionListener</a> is configured, it will notify this executor about stopped contexts. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org