Open davidhsingyuchen opened 2 years ago
oh hey - sorry for the delay. that's a good catch. we need to close the work
channel.
cough gleak
😁
...it just caught me these days leaking worker pools. Not that I'm not full of good intentions to not leak, yet ... well, you know...
My understanding is that the goruotines will still be waiting on
range work
even afterExample.Sample
returns, and the fact that those goroutines are still referencing thework
channel may further prevent the channel itself from being garbage collected. Please let me know if I'm missing anything, thanks!