Benchmark Database Access with Java 21 Virtual Threads
Virtual Threads become available in Java 21. They are a new type of threads that are not bound to a platform thread (also called OS or kernel threads), but instead are managed by the JVM itself. Virtual threads are very similar with Kotlin coroutines, or Go goroutines, and they were created to solve the same problem, but there are some Java specifics. Under the hoods, the work is still done by platform threads which are managed in a FIFO work-stealing ForkJoinPool....