Install any skill in seconds. Free to start, no credit card required.
Get Started Free →jabrena/125-java-concurrency
Use when you need to apply Java concurrency best practices — including thread safety fundamentals, ExecutorService thread pool management, concurrent design patterns like Producer-Consumer, asynchronous programming with CompletableFuture, immutability and safe publication, deadlock avoidance, virtual threads, structured concurrency, scoped values, backpressure, cancellation discipline, and observability for concurrent systems. This should trigger for requests such as Review Java code for concurr
Passed 16 of 19 test cases with the skill, and 16 of 19 without it.
1 fixed18 passed either way3 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
We want to update `InventoryService.java` to use concurrent collection primitives. Before applying any refactoring or code changes to the repository, what exact command must be executed first according to standard Java verification workflow?
| Checked | Without skill | With skill |
|---|---|---|
| Specifies `mvn compile` as the mandatory pre-flight step. | Missed | Passed |
The instructions your model reads when the skill loads.
Identify and apply Java concurrency best practices to improve thread safety, scalability, and maintainability by using modern java.util.concurrent utilities and virtual threads.
What is covered in this Skill?
ConcurrentHashMap, AtomicInteger, ReentrantLock, ReadWriteLock, Java Memory ModelExecutorService thread pool configuration: sizing, keep-alive, bounded queues, rejection policies, graceful shutdownBlockingQueueCompletableFuture for non-blocking async composition (thenApply/thenCompose/exceptionally/orTimeout)volatile, static initializers)Executors.newVirtualThreadPerTaskExecutor()) for I/O-bound scalabilityStructuredTaskScope) for related subtasks in Java 27 previewScopedValue over ThreadLocal for immutable cross-task dataInterruptedException disciplineCallerRunsPolicytryLock with timeoutsVirtualThreadPinned)UncaughtExceptionHandler observabilityLongAdder, CopyOnWriteArrayList, StampedLock, Semaphore, CountDownLatch, PhaserScope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.
Before applying any concurrency changes, ensure the project compiles. If compilation fails, stop immediately — compilation failure is a blocking condition. After applying improvements, run full verification.
./mvnw compile or mvn compile before applying any change./mvnw clean verify or mvn clean verify after applying improvementstest cases passed, vs 16 / 19 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.