What problem does it solve?
This Skill provides clear guidelines and utilities to ensure Kotlin coroutines are used safely, efficiently, and with proper context propagation, preventing common pitfalls like lost MDC data or unmanaged cancellations.
Core Features & Use Cases
- MDC Context Propagation: Ensures request tracing and logging context is maintained across coroutines.
- Dispatcher Selection: Guides the use of Default, Virtual Thread, and IO dispatchers for optimal performance.
- Retry Patterns: Offers built-in, configurable retry mechanisms for resilient operations.
- Structured Concurrency: Enforces best practices for lifecycle management and cancellation.
- Use Case: When making multiple asynchronous API calls that require consistent logging across all operations, this Skill ensures that the
traceId and requestId are correctly propagated to all child coroutines, allowing for seamless debugging and monitoring.
Quick Start
Use the coroutine skill to fetch user data concurrently using virtual threads.