concurrency

Guide JVM concurrency patterns covering threads, executors, futures, coroutines, and virtual threads.

1|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/iceflower/agent-skills --skill concurrency-iceflower
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: concurrency
Source: https://github.com/iceflower/agent-skills/tree/main/concurrency
Command: npx skills add https://github.com/iceflower/agent-skills --skill concurrency-iceflower

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

JVM concurrency guidance and patterns to help developers write robust, safe, and scalable multithreaded code on the JVM, covering thread safety, synchronization, executors, futures, coroutines, and virtual threads.

Core Features & Use Cases

  • Thread-safety guidelines and anti-patterns to avoid common pitfalls.
  • Executor framework usage, CompletableFuture patterns, and Kotlin coroutines in-depth.
  • Virtual threads, testing strategies, and practical migration patterns for existing codebases.
  • Real-world scenarios including multi-threaded services, data pipelines, and high-concurrency tasks.

Quick Start

Analyze current concurrency hotspots and apply the documented guidelines to refactor the critical paths.

Frequently Asked Questions about concurrency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ensure thread safety in JVM multi-threaded applications?

Thread safety in JVM applications requires applying synchronization primitives and structured guidelines to avoid common concurrency pitfalls. This Skill provides documented anti-patterns and thread-safety rules to refactor critical paths and prevent race conditions in multi-threaded servers.

What is the best way to configure executors for high-concurrency data pipelines?

Configuring executors for high-concurrency data pipelines involves selecting appropriate thread pools and applying structured CompletableFuture patterns. The Skill provides executor configuration guidance and real-world scenarios for scaling data processing pipelines safely.

How do virtual threads compare to Kotlin coroutines for asynchronous services?

Virtual threads and Kotlin coroutines represent different approaches to JVM concurrency, with virtual threads offering lightweight OS-level threads and coroutines providing structured async patterns. The Skill covers both in-depth, including migration patterns and practical usage for asynchronous services.

Does this concurrency guidance cover testing strategies for multi-threaded code?

Testing multi-threaded code is covered through dedicated testing strategies for JVM concurrency. The Skill includes practical approaches to validate thread safety, executor behavior, and asynchronous patterns to ensure robust multithreaded services.

When should I not use CompletableFuture in JVM concurrency?

CompletableFuture should be avoided when it leads to anti-patterns like excessive nesting or blocking operations that defeat asynchronous design. The Skill documents common concurrency anti-patterns and provides structured alternatives using executors and coroutines.