Native methods and virtual threads

Alan Bateman Alan.Bateman at oracle.com
Fri Jul 14 19:21:55 UTC 2023


On 14/07/2023 19:08, Brian S O'Neill wrote:
> A hint is a very weak change to a specification. It's in the same 
> league as a magic system property like 
> "jdk.virtualThreadScheduler.maxPoolSize"
>
> I'm interested in any other details you have regarding the decision to 
> incorporate the Blocker class. Thanks!

A linker option would be a standard API so not the same thing as the 
JDK-specific jdk.virtualThreadScheduler.maxPoolSize property. It's not 
something to rush into as the custom scheduler topic that I mentioned in 
one of the early replies will likely require some API into the 
scheduler. It might be that linker option isn't required, further 
exploration on the topic needed.

The motive for the internal Blocker class was to smooth over cases where 
a carrier thread can't be released. Over time we will chip away at the 
problem so that its usage will reduce.

-Alan


More information about the loom-dev mailing list