Is there a good implementation of continuations in Java?
If so, what is the overhead like? The JVM wasn't designed with these sort of things in mind, right? So is this kind of going against the grain?
Is there a good implementation of continuations in Java?
If so, what is the overhead like? The JVM wasn't designed with these sort of things in mind, right? So is this kind of going against the grain?
Consider also Kotlin Coroutines.
It's implemented via potentially more performant CPS transformations (still stackful) and can use any async executor under the hood like ForkJoinPool or Quasar integration.
Comes with handy guided library.
Beware of some tooling and reflection pitfalls.
Scala also runs on JVM. So it might be relevant.
What are Scala continuations and why use them?
In addition Scala has somewhat similar async/await feature: