virtual-threads-patterns
CommunityMaster Java 21+ Virtual Threads for high concurrency.
Authordandudzi
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill helps developers efficiently build highly concurrent, I/O-bound Java applications by leveraging Project Loom's virtual threads, structured concurrency, and best practices for avoiding common pitfalls.
Core Features & Use Cases
- Virtual Thread Creation: Learn to spawn and manage lightweight virtual threads.
- Structured Concurrency: Implement robust, scoped concurrent tasks with
StructuredTaskScope. - Pinning Avoidance: Understand and prevent carrier thread pinning with
synchronizedor blocking JNI. - Spring Boot Integration: Configure and utilize virtual threads within Spring Boot 3.2+ applications.
- Use Case: Optimize a high-traffic microservice by migrating its thread pool executor to
Executors.newVirtualThreadPerTaskExecutor(), enabling it to handle tens of thousands of concurrent requests with minimal resource overhead.
Quick Start
Use the virtual-threads-patterns skill to create a basic virtual thread that prints a message to the console.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: virtual-threads-patterns Download link: https://github.com/dandudzi/dotfiles/archive/main.zip#virtual-threads-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.