News and views from members of the Java team at Oracle
(Recorded at JVMLS 2023 - for more, check our JVMLS 2023 playlist.)
Ron Pressler explains the HotSpot continuations that underpin virtual threads, separating their role from the Java-level scheduler. He follows suspension and resumption through stack-frame freezing and thawing, showing why copying entire stacks repeatedly would waste work and how lazy copying and return barriers avoid that cost.
The implementation must also cooperate with garbage collectors while preserving references inside suspended frames. Pressler traces earlier representation experiments to heap-allocated stack chunks, explaining how their lifecycle enables fast copying without repeatedly decoding every frame. He closes with ongoing work on compressing suspended stacks to reduce virtual-thread memory usage further.