diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-13 14:31:49 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-13 14:31:49 +0300 |
| commit | 42645a4889c1e45ad2ab85e0a371ef8e1054062e (patch) | |
| tree | 314679bdfcc81229769dd165f3440e20e1ccc1d0 /internal/statsengine/engine.go | |
| parent | 21ed685fb7e64c4dc36250c67832d594fc119307 (diff) | |
fix(pidpicker): eliminate defer-inside-goroutine-in-loop anti-patterns
Extract the per-pid goroutine body from scanAllThreadsFrom into a named
scanThreadsWorker function. This removes both defer statements from the
anonymous closure that was spawned inside a for loop: the semaphore
release is now an explicit <-sem call immediately after I/O completes,
and wg.Done() is called directly after scanThreadsWorker returns.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/statsengine/engine.go')
0 files changed, 0 insertions, 0 deletions
