Skip to Main Content
 

Major Digest Home Java virtual threads encounter pinning problem - Major Digest

Java virtual threads encounter pinning problem

Java virtual threads encounter pinning problem

Java’s virtual threads, introduced in JDK 21 in September 2023 to make it easier to write and maintain concurrent applications, has suffered from a “pinning” issue that arises with synchronized methods or synchronized statements.  

Oracle detailed the virtual thread pinning issue this week on the Inside Java website. The two most common cases involve a virtual thread parking while in a synchronized method, and a virtual thread blocking when entering a synchronized method, because the object’s associated monitor is held by another thread. In both cases, the carrier or native thread is not released to do other other work. Virtual thread pinning could impact performance and scalability and potentially result in starvation and deadlock, according to the blog post.

To read this article in full, please click here

Source:
Published: