Native methods and virtual threads

Ron Pressler ron.pressler at oracle.com
Thu Jul 13 22:11:43 UTC 2023


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.

— Ron

> On 13 Jul 2023, at 22:26, Brian S O'Neill <bronee at gmail.com> wrote:
> 
> What was the criteria for adding the Blocker class?
> 
> On 2023-07-13 02:21 PM, Ron Pressler wrote:
> 
>> It sounds like a reasonable suggestion if experience shows us that there is, indeed, something to be done here, so I would suggest we revisit it after people gain more experience with both virtual threads and FFM. But until we know what if any actual problems people run into due to blocking, I’m not sure we should propose solutions.



More information about the loom-dev mailing list