loom ea based jdk18 feedback

Alan Bateman Alan.Bateman at oracle.com
Thu Nov 18 19:28:22 UTC 2021


On 18/11/2021 17:51, Jon Ross wrote:
> :
> This seems odd to me. It's a concept entirely defined and implemented
> by the JVM, yet it's opaque to the JVM? I'm unaware of any OS the JVM
> supports that has fibers, and even if it did, you'd likely just use
> the JVM's version to avoid mapping issues you allude to. The "All Your
> Blocking Are Belong to Us" section of the doc seems to imply that the
> JVM itself is controlling virtual threads to do exactly what I would
> like to do. Why do only the cool kids get to have fun?
This thread has got a bit confusing. Ron's message was about not 
exposing a way to use a custom scheduler in the first release. It sounds 
like you are asking about changing a library that does blocking I/O 
operations outside of the JDK to play nicely with virtual threads so 
they release the underlying thread to do other work. Is that right? If 
so, then the primitives you are looking for are LockSupport.park and unpark.

-Alan



More information about the loom-dev mailing list