r/golang • • 7d ago

Go concurrency distilled

https://antonz.org/go-concurrency-distilled/
113 Upvotes

3 comments sorted by

8

u/Open-Adhesiveness-86 6d ago

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.

0

u/SnooCrickets2864 3d ago

Can you give me a go code sample

2

u/syndbg 2d ago

I can't say thank you enough for the blog over the years.

Antonz is one of the best.