Access to Continuation.yield and ContinuationScope
    Alan Bateman 
    Alan.Bateman at oracle.com
       
    Fri Nov 26 07:11:58 UTC 2021
    
    
  
On 25/11/2021 19:21, Raul Raja Martinez wrote:
> Thanks!, that worked for my local tests.
>
> Are there any plans to bring back Continuation and ContinuationScope to
> public status to `java.lang` or similar or is the plan that this is going
> to remain internal?
The current focus is virtual threads and APIs for organizing large 
cohorts of threads. You are right that a low-level API for delimited 
continuations was exposed in EA builds for a long time but I think we've 
been consistent in replies here over the last 1-2 years that we weren't 
planning to expose it in a first release. There are issues with having 
the Thread identity change during execution, which is essentially what 
happens if you yield on one thread and continue on another. Once virtual 
threads are out of the way then we'll get back to topics such as custom 
schedulers and generators. It's possible that much of what you are 
looking to try out can be done with virtual threads and your own scheduler.
-Alan
    
    
More information about the loom-dev
mailing list