graal icon indicating copy to clipboard operation
graal copied to clipboard

Support Virtual Threads (Project Loom) in Native Image

Open christianwimmer opened this issue 2 years ago • 0 comments

TL;DR

OpenJDK project Loom adds virtual threads to JDK 19 (as a preview feature at first). Everything supported in OpenJDK should also be supported in GraalVM Native Image.

Goals

Expand and finish the virtual thread support in GraalVM Native Image. Initial support had been added a while ago and is already available for the JDK 17 based version of GraalVM Native Image. But since then, the Project Loom API has changed considerably so the initial implementation needs to be updated. Also, we need to test that all places where JDK classes can yield virtual threads (locks, I/O, part events, ...) also yield properly on Native Image. Performance should be comparable to the HotSpot implementation.

Since virtual threads are a preview feature in OpenJDK, they will also be a preview feature for GraalVM Native Image.

Non-Goals

We will not provide virtual thread support for the GraalVM releases based on JDK 11 and JDK 17.

christianwimmer avatar Sep 11 '22 02:09 christianwimmer