Top
image credit: Adobe Stock

Intro to virtual threads: A new approach to Java concurrency

November 3, 2022

Via: InfoWorld

One of the most far-reaching Java 19 updates is the introduction of virtual threads. Virtual threads are part of Project Loom, and are available in Java 19 as a preview.

How virtual threads work

Virtual threads introduce an abstraction layer between operating-system processes and application-level concurrency. Said differently, virtual threads can be used to schedule tasks that the Java virtual machine orchestrates, so the JVM mediates between the operating system and the program. Figure 1 shows the architecture of virtual threads.

Read More on InfoWorld