The JVM detaches the OS thread and reuses it for other tasks.
When a Virtual Thread encounters a blocking I/O operation, the JVM can detach the OS thread from the Virtual Thread and reuse it for other tasks. This happens transparently, allowing high concurrency without consuming additional system resources. For example, during a high-traffic period, such as a flash sale, this behavior allows more users to be served concurrently without additional hardware.
Additional Notes
How do Virtual Threads manage blocking I/O operations?