Java concurrency and virtual thread

From VincentChuWaiChow/vanguard-frontier-agentic · View interactive version

Java concurrency and virtual thread is an AI agent skill from the GitHub repository VincentChuWaiChow/vanguard-frontier-agentic. Use this skill when statically reviewing Java concurrency and Project Loom virtual-thread adoption for correctness and safety at scale — pooling or capping virtual threads, a virtual-thread migration that strips a bound on a limited downstream resource (connection pool, rate-limited API) without re-

How to use this skill

Skill file

java-concurrency-and-virtual-thread

Purpose

This skill statically assesses whether a Java codebase's virtual-thread adoption is correct and safe at scale, and whether its classic concurrency code is free of visibility, atomicity, and resource-exhaustion bugs. Virtual threads change the cost model of concurrency (creation is cheap, blocking is cheap) but do not remove the need to bound access to genuinely limited resources, and they introduce a JDK-version-dependent carrier-pinning hazard that is easy to over- or under-state without evidence. The review distinguishes what virtual threads fix (thread-creation cost, thread-count ceilings) from what they do not fix (the finite capacity of a downstream connection pool or rate-limited API), and gates every pinning claim on the JDK version and JFR evidence rather than blanket JDK-21-era folklore.

Trigger conditions

When not to use

Lean operating rules

References

Load these only when needed:

Response minimum

Return, at minimum:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.