loom ea based jdk18 feedback
Ron Pressler
ron.pressler at oracle.com
Thu Nov 18 13:31:38 UTC 2021
Hi.
> On 18 Nov 2021, at 05:40, Jon Ross <jonross at gmail.com> wrote:
>
>> So there is currently no way of exposing this particular class (which is mostly of interest for research).
>
> Is there another way to suspend/resume a fiber?
Virtual threads are threads, and so all the usual ways of suspending and resuming threads apply.
>
>> 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.
>
> Assuming you are talking about what I'm asking about: I would agree,
> but I would postulate (without any data at all) that most users use
> the threading and IO model of their chosen framework, more than using
> the JDK's user-facing APIs directly. I apologize in advance if I'm
> misunderstood the meaning of this thread. I'm new to loom so this
> might be likely.
>
The frameworks can use all kinds of threads provided by the JDK however they like. What is currently missing is their ability
to control how virtual threads are implemented internally, just as they can’t control how platform threads are implemented internally.
We will add that extra level of control once we’ve had time to properly evaluate it.
— Ron
More information about the loom-dev
mailing list