Skip to content

Commit 3dd3fc8

Browse files
committed
Merge branch '3.2.x'
Closes gh-39632
2 parents eb2ef12 + 3668c54 commit 3dd3fc8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/task-execution-and-scheduling.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ This changes the thread pool to use a bounded queue so that when the queue is fu
3737
Shrinking of the pool is more aggressive as threads are reclaimed when they are idle for 10 seconds (rather than 60 seconds by default).
3838

3939
A scheduler can also be auto-configured if it needs to be associated with scheduled task execution (using `@EnableScheduling` for instance).
40-
When virtual threads are enabled (using Java 21+ and configprop:spring.threads.virtual.enabled[] set to `true`) this will be a `SimpleAsyncTaskScheduler` that uses virtual threads.
41-
Otherwise, it will be a `ThreadPoolTaskScheduler` with sensible defaults.
4240

41+
If virtual threads are enabled (using Java 21+ and configprop:spring.threads.virtual.enabled[] set to `true`) this will be a `SimpleAsyncTaskScheduler` that uses virtual threads.
42+
This `SimpleAsyncTaskScheduler` will ignore any pooling related properties.
43+
44+
If virtual threads are not enabled, it will be a `ThreadPoolTaskScheduler` with sensible defaults.
4345
The `ThreadPoolTaskScheduler` uses one thread by default and its settings can be fine-tuned using the `spring.task.scheduling` namespace, as shown in the following example:
4446

4547
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]

0 commit comments

Comments
 (0)