loom ea based jdk18 feedback

Øystein Myhre Andersen o.myhre at gmail.com
Wed Nov 17 15:51:18 UTC 2021


The Continuation API in a single thread is exactly what I want in my
implementation of Simula's Quasi Parallel Systems.
I have used it in an experimental implementation and it works well.
The performance of great simulation models is excellent.

- Øystein

On Wed, Nov 17, 2021 at 4:38 PM Ron Pressler <ron.pressler at oracle.com>
wrote:

>
>
> > On 17 Nov 2021, at 11:13, dreamlike_ocean lei <dreamlike.vertx at gmail.com>
> wrote:
> >
> > 1, continuation api
> >
> >
> > I really hope I can directly access this api in the future version
>
> The Continuation class is fundamentally unsafe, and using it might result
> in miscompilation, as the JIT compiler bases some optimisations on the
> assumption that the current thread cannot change. So there is currently no
> way of exposing this particular class (which is mostly of interest for
> research). However, in the future, the JDK could conceivably add safe
> abstractions built on top of Continuation other than virtual threads, that
> would probably be confined to a single thread. Custom schedulers will be
> able to give you what I believe you want.
>
> >
> >   Virtual thread custom scheduler
> >
> >
> > I hope you can consider reopening the api of the custom scheduler in the
> > future version
>
> That is an API we would very much like to have, but we haven’t had time to
> review yet. I don’t know yet whether or not it will make it in time for the
> first release. Note that this is a very specialised API for internal,
> sophisticated, use by frameworks, only, and should rarely if ever be used
> by user code. Naturally, we prioritise the user-facing APIs.
>
>
> — Ron
>
>
>
>


More information about the loom-dev mailing list