Native methods and virtual threads
Alan Bateman
Alan.Bateman at oracle.com
Fri Jul 14 09:13:51 UTC 2023
On 13/07/2023 23:11, Ron Pressler wrote:
> Blocker is not a user facing construct, but an implementation detail that offers non-ideal behaviour when that’s the best we can do. Obviously we’d like to eventually replace its use with better solutions where possible.
>
> Offering something similar outside the JDK may well be something we’ll do once we learn more about virtual thread usage in the field. There are other virtual-thread-related capabilities that are currently only available inside the JDK because we don’t yet know how to prioritise their design as an API.
>
> Anyway, your suggestion is certainly an idea to consider if and when the matter of blocking native calls rises in the priority queue. Of course, this is just my perspective and not necessarily that of the Panama team.
>
Just to add that this also interacts with other exploration into custom
schedulers and notifications that an operations may block indefinitely.
Custom schedulers potentially means executing arbitrary code at
sensitive times and will need taming. A linker option that is on the
opposite end of the spectrum to "trivial" may have to interact with
custom schedulers so something to examine when this topic bubbles up to
the priority queue.
-Alan
More information about the panama-dev
mailing list