Synchronous Blocking to Async / Reactive Modernization
Convert blocking I/O code into non-blocking async/await, reactive streams, or virtual threads.
Modernize blocking I/O loops and thread sleeps into non-blocking async/await, structured concurrency, or Java 21 Virtual Threads.
Execution Workflow Procedure
Ordered steps the coding agent executes when performing this skill.
Identify Blocking Operations
Locate blocking HTTP calls, synchronous disk reads, thread sleep calls, and synchronous database queries.
Apply Structured Concurrency & Limits
Implement concurrency rate limiters (semaphores) and structured concurrency scopes with cancellation tokens.
Handle Partial Failure Aggregation
Aggregate results cleanly and ensure failures in parallel subtasks cancel pending sibling tasks without leaking threads.
Agent Safety Guardrails & Anti-Hallucination Rules
- DO NOT fire unbounded parallel requests without semaphore or pool rate limiting.
- DO NOT swallow cancellation exceptions or leave orphaned promises.
Expected Output Format
Non-blocking async implementation with error cancellation.
Domain Verification Checks
Example Agent Invocations
Install / Configure This Skill
# Place in .cursorrules or create .cursor/rules/sync-to-async-modernization.mdc # Trigger: Whenever you perform synchronous blocking to async / reactive modernization --- name: sync-to-async-modernization description: Convert blocking synchronous I/O into non-blocking async/await, Virtual Threads, or stream pipelines. version: 1.0.0 compatibility: [Cursor, Claude Code, Cline, Roo Code, Antigravity] --- # Synchronous Blocking to Async / Reactive Modernization ## Objective Modernize sequential blocking I/O into high-throughput structured concurrency with backpressure and cancellation support. ## Workflow 1. **Blocking Call Scan**: Identify synchronous network, database, and file I/O. 2. **Concurrency Scopes**: Apply structured concurrency (Java Virtual Threads / Promise.all) with bounded semaphores. 3. **Cancellation & Error Handling**: Ensure failures in one branch cleanly cancel sibling operations.
Need a quick one-time prompt for chat?
Try the Synchronous Blocking to Async / Reactive Modernization — a lightweight version designed for 1-click copying directly into Claude, ChatGPT, or Cursor chat.
SprintKit Workflow Integrations
Complementary tools and checklists to pair with this agent workflow.
Related Agent Skills
Explore related procedural workflows in this discipline.
API Performance Bottleneck & N+1 Query Optimization
Diagnose slow database queries, serialization bottlenecks, and memory churn in sluggish API endpoints.
Node.js & V8 Memory Leak / CPU Spike Investigation
Analyze heap snapshots, unclosed event listeners, and runaway closures causing Node.js OOM crashes.
Safe Legacy Code Modernization with Golden Master Tests
Safely modernize fragile legacy codebases using Martin Fowler refactoring patterns and characterization tests.