java-concurrency
Master Java concurrency - threads, executors, locks, CompletableFuture, virtual threads
By pluginagentmarketplace · 447 installs
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-concurrency
Source repository · Upstream listing
Java Concurrency Skill
Master Java concurrency patterns for thread safe applications.
Overview
This skill covers concurrency from basic threads to virtual threads (Java 21+), including thread pools, synchronization, and CompletableFuture.
When to Use This Skill
Use when you need to:
Write thread safe code
Implement parallel processing
Use async programming patterns
Tune thread pools
Debug concurrency issues
Topics Covered
Thread Management
Thread lifecycle and states
Daemon vs user threads
Interrupt handling
Synchronization
synchronized, volatile
Lock interfaces (ReentrantLock)
Atomic operations
Executors
ThreadPoolExecutor configuration
ForkJoinPool
Virtual Threads (Java 21+)
CompletableFuture
Async execution
Chaining and composition
Exception handling
Quick Reference
Thread Pool Sizing
Workload Formula Example
CPU bound cores 8 threads
I/O bound cores (1 + wait/compute) 80 threads
Troubleshooting
Problem Cause Solution
Deadlock Circular lock Lock ordering, tryLock
Race condition Missing sync Add locks/atomics
Thread starvation Unfair scheduling Fair locks
Debug Commands
Usage