Virtual Thread
A lightweight Java thread managed by the JVM so large numbers of blocking-style tasks can be scheduled over a smaller set of carrier threads.
Concurrency Model
Java virtual threads preserve the familiar thread-per-task programming model while making blocked tasks much cheaper than creating the same number of platform threads.
They improve concurrency for waiting-heavy workloads; they do not make CPU-bound code execute faster than the available processors.
Resource Boundary
Database connections, remote service capacity and memory remain finite. Replacing a bounded thread pool with unbounded virtual-thread admission can simply move the queue into HikariCP, the database or another dependency.
Modern Java also reduced important pinning cases, but blocking native/foreign behavior still requires measurement.
See High-Performance Java Data Systems.
Related JVM Concepts
- Connection Pool
- Backpressure
- Structured Concurrency
Source
- https://openjdk.org/jeps/444