Explain that enabling virtual threads disables traditional thread pools
Closes gh-41937
This commit is contained in:
@@ -83,30 +83,32 @@ public class TaskExecutionProperties {
|
||||
|
||||
/**
|
||||
* Queue capacity. An unbounded capacity does not increase the pool and therefore
|
||||
* ignores the "max-size" property.
|
||||
* ignores the "max-size" property. Doesn't have an effect if virtual threads are
|
||||
* enabled.
|
||||
*/
|
||||
private int queueCapacity = Integer.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* Core number of threads.
|
||||
* Core number of threads. Doesn't have an effect if virtual threads are enabled.
|
||||
*/
|
||||
private int coreSize = 8;
|
||||
|
||||
/**
|
||||
* Maximum allowed number of threads. If tasks are filling up the queue, the pool
|
||||
* can expand up to that size to accommodate the load. Ignored if the queue is
|
||||
* unbounded.
|
||||
* unbounded. Doesn't have an effect if virtual threads are enabled.
|
||||
*/
|
||||
private int maxSize = Integer.MAX_VALUE;
|
||||
|
||||
/**
|
||||
* Whether core threads are allowed to time out. This enables dynamic growing and
|
||||
* shrinking of the pool.
|
||||
* shrinking of the pool. Doesn't have an effect if virtual threads are enabled.
|
||||
*/
|
||||
private boolean allowCoreThreadTimeout = true;
|
||||
|
||||
/**
|
||||
* Time limit for which threads may remain idle before being terminated.
|
||||
* Time limit for which threads may remain idle before being terminated. Doesn't
|
||||
* have an effect if virtual threads are enabled.
|
||||
*/
|
||||
private Duration keepAlive = Duration.ofSeconds(60);
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ public class TaskSchedulingProperties {
|
||||
public static class Pool {
|
||||
|
||||
/**
|
||||
* Maximum allowed number of threads.
|
||||
* Maximum allowed number of threads. Doesn't have an effect if virtual threads
|
||||
* are enabled.
|
||||
*/
|
||||
private int size = 1;
|
||||
|
||||
|
||||
@@ -897,12 +897,14 @@ public class ServerProperties {
|
||||
public static class Threads {
|
||||
|
||||
/**
|
||||
* Maximum amount of worker threads.
|
||||
* Maximum amount of worker threads. Doesn't have an effect if virtual threads
|
||||
* are enabled.
|
||||
*/
|
||||
private int max = 200;
|
||||
|
||||
/**
|
||||
* Minimum amount of worker threads.
|
||||
* Minimum amount of worker threads. Doesn't have an effect if virtual threads
|
||||
* are enabled.
|
||||
*/
|
||||
private int minSpare = 10;
|
||||
|
||||
@@ -1309,12 +1311,14 @@ public class ServerProperties {
|
||||
private Integer selectors = -1;
|
||||
|
||||
/**
|
||||
* Maximum number of threads.
|
||||
* Maximum number of threads. Doesn't have an effect if virtual threads are
|
||||
* enabled.
|
||||
*/
|
||||
private Integer max = 200;
|
||||
|
||||
/**
|
||||
* Minimum number of threads.
|
||||
* Minimum number of threads. Doesn't have an effect if virtual threads are
|
||||
* enabled.
|
||||
*/
|
||||
private Integer min = 8;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user