Loading...
Loading...
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, scoped values, backpressure, cancellation discipline, and observability for concurrent systems. This should trigger for requests such as Review Java code for concurrency. Part of cursor-rules-java project
npx skill4agent add jabrena/cursor-rules-java 125-java-concurrencyjava.util.concurrentConcurrentHashMapAtomicIntegerReentrantLockReadWriteLockExecutorServiceBlockingQueueCompletableFuturethenApplythenComposeexceptionallyorTimeoutvolatileExecutors.newVirtualThreadPerTaskExecutor()ScopedValueThreadLocalInterruptedExceptionCallerRunsPolicytryLockVirtualThreadPinnedUncaughtExceptionHandlerLongAdderCopyOnWriteArrayListStampedLockSemaphoreCountDownLatchPhaser./mvnw compilemvn compile./mvnw clean verifymvn clean verify./mvnw compilemvn compilereferences/125-java-concurrency.md./mvnw clean verifymvn clean verify