r/java 1d ago

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.

33 Upvotes

4 comments sorted by

5

u/pip25hu 1d ago

Very interesting!

1

u/jaccomoc 1d ago

Thanks!

2

u/Prateeeek 1d ago

Wonderful read!

1

u/jaccomoc 1d ago

Thankyou! Appreciate the feedback.