Skip to content

Commit 31dcc00

Browse files
author
Lukas Dohmen
committed
spring-projectsGH-39732 Update description of virtual threads
1 parent 118120c commit 31dcc00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ 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.
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.
392392
This behavior can be a problem when you rely on, e.g. `@Scheduled` beans 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.
394394
This does not only affect scheduling, but can be the case with other technologies, too!

0 commit comments

Comments
 (0)