New Early Access builds

Mark Raynsford org.openjdk at io7m.com
Wed Jul 1 09:23:56 UTC 2020


On 2020-07-01T09:51:59 +0100
Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 30/06/2020 20:25, Mark Raynsford wrote:
> > :
> > It's a little circuitous, but the basic issue is that I'm working under
> > soft-realtime constraints (3D rendering), and I'm working with APIs such
> > as Vulkan that demand that I make requests from specific threads.
> >  
> Can you say a bit more about this? Is there native code where 
> pthread_self() must be a specific thread or are there Java libraries in 
> the picture? If there are Java libraries in the picture then it may not 
> work as you expect because Thread.currentThread() will return the Thread 
> object for the virtual thread and maybe the libraries expects it to be a 
> specific Thread tied to Vulkan.

Thankfully, only pthread_self() matters in my case. Vulkan specifies
that access to various API object must be "externally synchronized". In
other words you either need to use locks, or you need to make sure you
only use the Vulkan API from a single kernel thread. There are no Java
libraries involved that do any kind of "is this thread the right
thread" checks.

-- 
Mark Raynsford | https://www.io7m.com



More information about the loom-dev mailing list