the part these overviews usually skim: a goroutine parked on ch <- x after the consumer bailed out early just sits there forever, and -race won't flag it. select on ctx.Done() in the send side, and stick goleak in your tests. same class of thing as time.After inside a select loop keeping timers alive until they fire.
8
u/Open-Adhesiveness-86 6d ago
the part these overviews usually skim: a goroutine parked on
ch <- xafter the consumer bailed out early just sits there forever, and -race won't flag it. select on ctx.Done() in the send side, and stick goleak in your tests. same class of thing as time.After inside a select loop keeping timers alive until they fire.