[External] : Re: Native interop with Virtual Threads

Ron Pressler ron.pressler at oracle.com
Mon Jun 26 23:01:22 UTC 2023



> On 26 Jun 2023, at 17:45, Danish Nawab <dnawab at outlook.com> wrote:
> 
> Thanks Ron. 
> 
> What about native code that doesn’t make an upcall but does a blocking operation directly (via OS syscalls or similar)? Are such cases also rare? 

Yes. But supporting those — even if there was reason to — would have been even harder, as Java has no control or knowledge over what native code does.

> 
> What would be the advice if someone is making blocking calls from their downcalls? It might not always be possible to rewrite it in Java. 

If those operations are both frequent and lengthy, they shouldn’t be done on virtual threads.

— Ron


More information about the loom-dev mailing list