I am looking for recent work presenting continuations in Java. I have come across the same question here but it dates back for a year or two.
There is some work such as JavaFlow by Apache, RIFE Continuations (that I cannot download for any reason now). Also there is a blog post mentioning the support in JDK but it seems that the support will span to Java 8. I also reckon that continuations are also introduced in recent Scala versions.
I am looking for implementations in Java presenting the continuations concept. And, I am not looking for the works that present continuation-passing-style (CSP).
I'd be thankful for any other work you might know.
Continuations allow you to literally "jump" to different places in your code. They are a low-level primitive that gives you control over execution flow, allowing you implement everything from resumable exceptions to coroutines.
A Continuation object is an immutable object that captures everything in the Java stack. This includes (1) current instruction pointer, (2) return addresses, and (3) local variables. Continuation objects are used to restore the captured execution states later.
The Java Fibers are also known as Java Virtual Machine (JVM) Fibers in the programming context. The JVM Fibers are user-mode threads that can be applied in the user mode. Every line of code that runs in Java is run in the form of threads.
It's not clear from your post why JavaFlow wouldn't meet your needs. JYeild is another library and I'd start with an Apache project before try a project like JYeild with less support.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With