Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Repair Thread Pool Starvation

    1

    Repair thread-pool starvation from nested waits, callback affinity, fan-out, or shutdown competition without adding capacity.

    $5

    Secure checkout via Stripe

    30-day refund guarantee

    Converts to your local currency at checkout

    Security scanned
    Repair Thread Pool Starvation

    Repair Thread Pool Starvation

    Example session with this skill installed

    Our Java report service uses a fixed pool of 8 workers. Each request task running in that pool submits a database mapping child back to the same pool and calls Future.get(). With 8 concurrent reports, all parents wait and all children remain queued forever. Repair locally with latches and fake database results. Keep 8 workers, the bounded queue, rejection policy, timeouts, retries, ordering, and result format; do not access the database or production executor.

    • Read your context and instructions
    • Compiled the repair thread pool

    Starvation cycle found. Eight parent tasks occupy all eight workers and synchronously wait for child tasks queued to the same executor, so no child can start. The repair uses repository-supported completion composition and explicit task ownership, preserves pool size, queue, rejection, timeout, retry, and result semantics, and proves progress with an eight-parent barrier fixture.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Thread pool starvation occurs when tasks occupy every worker while synchronously waiting for child tasks queued to that same exhausted pool. This creates a capacity dependency cycle where the CPU sits idle while the application freezes under load.

    What it does

    • Identifies blocking and completion edges across request, child, and shutdown task paths.
    • Reconstructs the smallest saturation state to isolate capacity dependency cycles.
    • Removes same-pool blocking by implementing nonblocking composition or executor separation.
    • Preserves existing backpressure, rejection, and timeout semantics without increasing worker counts.
    • Builds deterministic saturation tests using exact-capacity barriers instead of sleeps.

    Frameworks & tools

    Works with Java/JVM (java.util.concurrent), C# (.NET Task Parallel Library), Python (concurrent.futures), and Go. Compatible with any environment using fixed or bounded executors.

    Why this beats prompting it yourself

    Most LLMs suggest increasing thread counts or timeouts, which only delays the crash. This skill enforces an acyclic task-capacity contract, identifying the structural dependency flaw that causes the freeze rather than just treating the symptoms.

    Use cases

    • Fixing deadlocks where parent tasks wait for child tasks in the same saturated pool.
    • Resolving shutdown sequences that hang behind tasks they are trying to drain.
    • Remediating throughput collapse in systems using nested submissions.
    • Verifying concurrency fixes with high-fidelity saturation tests.

    Known limitations

    Cannot move blocking work onto event loops or modify production worker counts. Requires repository access to inspect executor configurations and task submission paths.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 1 month ago

    • Passed all security checks, Safe to install

    Listed1 month ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions