[tomcat] branch 10.0.x updated: Remove meaningless code.

2022-09-26 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 667e6cf509 Remove meaningless code.
667e6cf509 is described below

commit 667e6cf509668d2b6d2c384187b4ae660ce83951
Author: lihan 
AuthorDate: Tue Sep 27 11:25:24 2022 +0800

Remove meaningless code.
---
 java/org/apache/tomcat/util/threads/TaskQueue.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/threads/TaskQueue.java 
b/java/org/apache/tomcat/util/threads/TaskQueue.java
index cacb320d65..6b250ee9d3 100644
--- a/java/org/apache/tomcat/util/threads/TaskQueue.java
+++ b/java/org/apache/tomcat/util/threads/TaskQueue.java
@@ -34,7 +34,6 @@ public class TaskQueue extends LinkedBlockingQueue {
 
 private static final long serialVersionUID = 1L;
 protected static final StringManager sm = 
StringManager.getManager(TaskQueue.class);
-private static final int DEFAULT_FORCED_REMAINING_CAPACITY = -1;
 
 private transient volatile ThreadPoolExecutor parent = null;
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.0.x updated: Remove meaningless code

2022-05-10 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.0.x by this push:
 new 9317827f7a Remove meaningless code
9317827f7a is described below

commit 9317827f7acaead4b203183c31526da331288f92
Author: lihan 
AuthorDate: Sun May 8 19:32:59 2022 +0800

Remove meaningless code
---
 .../org/apache/catalina/core/StandardThreadExecutor.java | 16 
 java/org/apache/catalina/core/mbeans-descriptors.xml |  4 
 webapps/docs/changelog.xml   |  6 ++
 webapps/docs/config/executor.xml |  4 
 4 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardThreadExecutor.java 
b/java/org/apache/catalina/core/StandardThreadExecutor.java
index 2f8aaf4d2c..6e18c61852 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);
@@ -214,10 +206,6 @@ public class StandardThreadExecutor extends 
LifecycleMBeanBase
 return name;
 }
 
-public boolean isPrestartminSpareThreads() {
-
-return prestartminSpareThreads;
-}
 public void setThreadPriority(int threadPriority) {
 this.threadPriority = threadPriority;
 }
@@ -251,10 +239,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/java/org/apache/catalina/core/mbeans-descriptors.xml 
b/java/org/apache/catalina/core/mbeans-descriptors.xml
index a04ccbe4af..6fa6a85a02 100644
--- a/java/org/apache/catalina/core/mbeans-descriptors.xml
+++ b/java/org/apache/catalina/core/mbeans-descriptors.xml
@@ -1524,10 +1524,6 @@
type="int"
writeable="false" />
 
-
 
 511.
 (jfclere/markt)
   
+  
+Remove the prestartminSpareThreads attribute of the
+StandardThreadExecutor since all core threads are always
+started by default making this attribute meaningless. Pull request
+510 provided by Aooohan. (markt)
+  
 
   
   
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 @@
   (int) The maximum number of runnable tasks that can queue up awaiting
 execution before we reject them. Default value is 
Integer.MAX_VALUE
 
-
-  (boolean) Whether minSpareThreads should be started when starting the 
Executor or not,
-  the default is false
-
 
   (long) If a ThreadLocalLeakPreventionListener 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