You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/05/22 12:49:12 UTC

[tomcat] 01/02: Add default prefix for virtual threads and document the default prefixes

This is an automated email from the ASF dual-hosted git repository.

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

commit a92b252f91b68eee0e3af04ec2d2df6dfcff5b67
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Sat May 13 13:29:57 2023 +0100

    Add default prefix for virtual threads and document the default prefixes
---
 java/org/apache/catalina/core/StandardVirtualThreadExecutor.java | 2 +-
 webapps/docs/config/executor.xml                                 | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardVirtualThreadExecutor.java b/java/org/apache/catalina/core/StandardVirtualThreadExecutor.java
index d9d584ee41..eb6255f939 100644
--- a/java/org/apache/catalina/core/StandardVirtualThreadExecutor.java
+++ b/java/org/apache/catalina/core/StandardVirtualThreadExecutor.java
@@ -35,7 +35,7 @@ public class StandardVirtualThreadExecutor extends LifecycleMBeanBase implements
 
     private String name;
     private java.util.concurrent.Executor executor;
-    private String namePrefix;
+    private String namePrefix = "tomcat-virt-";
 
     public void setName(String name) {
         this.name = name;
diff --git a/webapps/docs/config/executor.xml b/webapps/docs/config/executor.xml
index b5e48099f5..f0e7e0fa3e 100644
--- a/webapps/docs/config/executor.xml
+++ b/webapps/docs/config/executor.xml
@@ -95,7 +95,8 @@
     </attribute>
     <attribute name="namePrefix" required="false">
       <p>(String) The name prefix for each thread created by the executor.
-         The thread name for an individual thread will be <code>namePrefix+threadNumber</code></p>
+         The thread name for an individual thread will be <code>namePrefix+threadNumber</code>. The default value is
+         <code>tomcat-exec-</code>.</p>
     </attribute>
     <attribute name="maxThreads" required="false">
       <p>(int) The max number of active threads in this pool, default is <code>200</code></p>
@@ -136,7 +137,8 @@
   <attributes>
     <attribute name="namePrefix" required="false">
       <p>(String) The name prefix for each thread created by the executor.
-         The thread name for an individual thread will be <code>namePrefix+threadNumber</code></p>
+         The thread name for an individual thread will be <code>namePrefix+threadNumber</code>. The default value is
+         <code>tomcat-virt-</code></p>
     </attribute>
   </attributes>
 


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