Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuations in Java [closed]

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.

like image 841
nobeh Avatar asked Sep 17 '11 17:09

nobeh


People also ask

How do continuations work?

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.

What is continuation in Java?

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.

What is fiber Java?

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.


1 Answers

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.

like image 58
Chip McCormick Avatar answered Oct 18 '22 07:10

Chip McCormick