Back to feed
Dev.to
Dev.to
7/10/2026
Your Loom App Quietly Became a Thread Pool Again: A Field Guide to Virtual Thread Pinning

Your Loom App Quietly Became a Thread Pool Again: A Field Guide to Virtual Thread Pinning

Short summary

A field guide to virtual thread pinning in Java Loom, explaining how synchronized blocks and native frames cause carrier thread starvation. The author shares a real incident where a service plateaued at 420 RPS due to pinning, despite having millions of virtual threads available. Covers the two causes of pinning, what JDK 24 fixed, and how to detect it before throughput suffers.

  • Virtual thread pinning occurs when blocked threads can't unmount from carriers, causing scheduler starvation
  • Only two causes: synchronized blocks (fixed in JDK 24) and native frames (still unfixed)
  • Detection strategies and code patterns to avoid pinning in production

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more