You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within the Phase 1 util.WaitFor condition, the stability check does case <-util.After(c.cfg.Clock, 1*time.Second). util.After spawns a goroutine and uses an unbuffered channel; if the ctx.Done() branch wins that select, the goroutine can block forever trying to send after the timer fires, leaking a goroutine per cancellation. Consider using an inline clock timer (c.cfg.Clock.NewTimer) and stopping/draining it on cancellation to avoid leaks and reduce per-iteration goroutine churn.
Within the Phase 1
util.WaitForcondition, the stability check doescase <-util.After(c.cfg.Clock, 1*time.Second).util.Afterspawns a goroutine and uses an unbuffered channel; if thectx.Done()branch wins that select, the goroutine can block forever trying to send after the timer fires, leaking a goroutine per cancellation. Consider using an inline clock timer (c.cfg.Clock.NewTimer) and stopping/draining it on cancellation to avoid leaks and reduce per-iteration goroutine churn.Originally posted by @Copilot in #208 (comment)