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:11 UTC

[tomcat] branch 8.5.x updated (e5decc41fb -> 4b8b437134)

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

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


    from e5decc41fb Add useVirtualThreads attribute to endpoints.
     new a92b252f91 Add default prefix for virtual threads and document the default prefixes
     new 4b8b437134 Fix method name. Use method rather than field.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/catalina/core/StandardVirtualThreadExecutor.java | 2 +-
 java/org/apache/tomcat/util/net/AbstractEndpoint.java            | 4 ++--
 webapps/docs/config/executor.xml                                 | 6 ++++--
 3 files changed, 7 insertions(+), 5 deletions(-)


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


[tomcat] 02/02: Fix method name. Use method rather than field.

Posted by ma...@apache.org.
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 4b8b437134e2bed4285eaaec0fe1ec00e3223169
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon May 22 13:48:31 2023 +0100

    Fix method name. Use method rather than field.
---
 java/org/apache/tomcat/util/net/AbstractEndpoint.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
index 423403e31f..0bc0c4eb3b 100644
--- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java
@@ -634,7 +634,7 @@ public abstract class AbstractEndpoint<S,U> {
     public void setUseVirtualThreads(boolean useVirtualThreads) {
         this.useVirtualThreads = useVirtualThreads;
     }
-    public boolean getVirtualThreads() {
+    public boolean getUseVirtualThreads() {
         return useVirtualThreads;
     }
 
@@ -1074,7 +1074,7 @@ public abstract class AbstractEndpoint<S,U> {
 
     public void createExecutor() {
         internalExecutor = true;
-        if (useVirtualThreads) {
+        if (getUseVirtualThreads()) {
             executor = new VirtualThreadExecutor(getName() + "-exec-");
         } else {
             TaskQueue taskqueue = new TaskQueue();


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


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

Posted by ma...@apache.org.
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