diff --git a/jetty-core/jetty-server/src/main/config/etc/jetty-threadpool-all-virtual.xml b/jetty-core/jetty-server/src/main/config/etc/jetty-threadpool-all-virtual.xml index 67943a3cf0bf..338d08a745cf 100644 --- a/jetty-core/jetty-server/src/main/config/etc/jetty-threadpool-all-virtual.xml +++ b/jetty-core/jetty-server/src/main/config/etc/jetty-threadpool-all-virtual.xml @@ -9,7 +9,7 @@ org.eclipse.jetty - Virtual threads enabled. Using all virtual threads. + Virtual threads enabled. Using virtual threads for all Jetty tasks. diff --git a/jetty-core/jetty-server/src/main/config/etc/jetty-threadpool-virtual.xml b/jetty-core/jetty-server/src/main/config/etc/jetty-threadpool-virtual.xml index 71dc9444ba8d..099d33ddc4ba 100644 --- a/jetty-core/jetty-server/src/main/config/etc/jetty-threadpool-virtual.xml +++ b/jetty-core/jetty-server/src/main/config/etc/jetty-threadpool-virtual.xml @@ -37,7 +37,7 @@ org.eclipse.jetty - Virtual threads are enabled. + Virtual threads enabled. Using virtual threads only for application tasks. diff --git a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/TrackingExecutor.java b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/TrackingExecutor.java index 8a8bd258e4af..9714d5490741 100644 --- a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/TrackingExecutor.java +++ b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/TrackingExecutor.java @@ -29,7 +29,7 @@ public class TrackingExecutor implements Executor, Dumpable private final Set _threads = ConcurrentHashMap.newKeySet(); private boolean _detailed; - TrackingExecutor(Executor executor, boolean detailed) + public TrackingExecutor(Executor executor, boolean detailed) { _threadFactoryExecutor = executor; _detailed = detailed; diff --git a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/VirtualThreadPool.java b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/VirtualThreadPool.java index 4873403b1e96..6182decf4f1a 100644 --- a/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/VirtualThreadPool.java +++ b/jetty-core/jetty-util/src/main/java/org/eclipse/jetty/util/thread/VirtualThreadPool.java @@ -71,6 +71,17 @@ public void setName(String name) _name = name; } + /** + * + * @return {@code true} if the virtual threads will be tracked. + * @see TrackingExecutor + */ + @ManagedAttribute("virtual threads are tracked") + public boolean isTracking() + { + return _tracking; + } + public void setTracking(boolean tracking) { if (isRunning()) @@ -78,11 +89,6 @@ public void setTracking(boolean tracking) _tracking = tracking; } - public boolean isTracking() - { - return _tracking; - } - @ManagedAttribute("reports additional details in the dump") public boolean isDetailedDump() { @@ -99,7 +105,7 @@ public void setDetailedDump(boolean detailedDump) @Override protected void doStart() throws Exception { - _main = new Thread("keepalive") + _main = new Thread("jetty-virtual-thread-pool-keepalive") { @Override public void run()