gograph_concurrency
Find all concurrency primitives like goroutines, channels, mutexes, and select statements in Go code to audit race safety and understand async flow.
Instructions
Find all concurrency primitives in the codebase: goroutine spawns (go statements), channel operations, sync.Mutex/RWMutex, sync.WaitGroup, sync.Once, and select statements. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Optional term filter (e.g., "mutex", "goroutine", "channel"). WHEN TO USE: When auditing race safety, understanding async flow, or locating all synchronization points before a concurrency refactor. NOT TO USE: For standard sequential call flow analysis (use gograph_callers/gograph_callees). RETURNS: File locations, line numbers, and primitive kind for each concurrency site; empty when no concurrency primitives are found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | No | Optional filter term (e.g., 'goroutine', 'mutex', 'channel') |