# Sample: an async deadlock caused by a SynchronizationContext

AsyncDeadlockDemo installs a single-threaded SynchronizationContext, like the one a UI framework installs, then
blocks on .Result. The continuation is posted back to a thread that is busy waiting, and nothing moves again.

    ./collect.sh              # runs the app and collects artifacts/asyncdeadlock.dmp
    ./run-in-docker.sh        # same, inside a Linux container (use this on macOS)

Then let the agent investigate:

    dotnet-dump analyze artifacts/asyncdeadlock.dmp -c "parallelstacks" -c "syncblk" -c "dumpasync" -c "exit"

syncblk prints nothing: no Monitor is involved. The evidence is the blocked thread, the pending state machine,
and the continuation still sitting in the queue of the SynchronizationContext.

.claude/skills/analyzing-dotnet-dumps/SKILL.md is the skill the agent uses. Claude Code and GitHub Copilot read
it from that path as is; for Codex, move the analyzing-dotnet-dumps folder to .agents/skills/.

Prerequisites: .NET 10 SDK, and dotnet-dump:

    dotnet tool install --global dotnet-dump
