Skip to content

Commit 9acd537

Browse files
committed
Merge branch '3.2.x'
Closes gh-39738
2 parents f3f7acc + 490161c commit 9acd537

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/spring-application.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,11 +387,10 @@ If you're running on Java 21 or up, you can enable virtual threads by setting th
387387
Before turning on this option for your application, you should consider https://docs.oracle.com/en/java/javase/21/core/virtual-threads.html[reading the official Java virtual threads documentation].
388388
In some cases, applications can experience lower throughput because of "Pinned Virtual Threads"; this page also explains how to detect such cases with JDK Flight Recorder or the `jcmd` CLI.
389389

390-
WARNING: One side effect of virtual threads is that these threads are daemon threads.
391-
A JVM will exit if there are no non-daemon threads.
392-
This behavior can be a problem when you rely on, e.g. `@Scheduled` beans to keep your application alive.
390+
WARNING: One side effect of virtual threads is that they are daemon threads.
391+
A JVM will exit if all of its threads are daemon threads.
392+
This behavior can be a problem when you rely on `@Scheduled` beans, for example, to keep your application alive.
393393
If you use virtual threads, the scheduler thread is a virtual thread and therefore a daemon thread and won't keep the JVM alive.
394-
This does not only affect scheduling, but can be the case with other technologies, too!
394+
This not only affects scheduling and can be the case with other technologies too.
395395
To keep the JVM running in all cases, it is recommended to set the property configprop:spring.main.keep-alive[] to `true`.
396396
This ensures that the JVM is kept alive, even if all threads are virtual threads.
397-

0 commit comments

Comments
 (0)