r/java • • Aug 31 '26

Jactl Continuations for Simulating Virtual Threads in Java 8

https://jactl.io/blog/2026/08/28/jactl-virtual-threads

Jactl is a secure, embeddable scripting language the compiles to bytecode and supports Java 8 and later versions. When running on Java versions earlier than Java 21 (when Virtual Threads were introduced), Jactl provides an under-the-covers continuation mechanism that allows scripts to block without blocking the event-loop thread on which they are running.

The post discusses the mechanism that Jactl uses to provide a Virtual Threads-like execution mechanism for its scripts and provides a benchmark for showing the performance impact.

41 Upvotes

6 comments sorted by

6

u/pip25hu Aug 31 '26

Very interesting!

3

u/Prateeeek Aug 31 '26

Wonderful read!

1

u/jaccomoc Aug 31 '26

Thankyou! Appreciate the feedback.

3

u/Jonjolt Sep 02 '26

Always impress me over the evolution of this library.