gograph_concurrency
Find all concurrency primitives in Go code: goroutines, channels, mutexes, WaitGroups, Once, and select statements. Filter by term like 'mutex' or 'channel'. Essential for race safety audits and async flow analysis.
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') |