gomega
gomega copied to clipboard
`work` channel in `gmeasure.Experiment.Sample` is not closed upon return
My understanding is that the goruotines will still be waiting on range work
even after Example.Sample
returns, and the fact that those goroutines are still referencing the work
channel may further prevent the channel itself from being garbage collected. Please let me know if I'm missing anything, thanks!
oh hey - sorry for the delay. that's a good catch. we need to close the work
channel.
cough gleak
😁
In fact! https://github.com/onsi/gomega/commit/119d4cea3d32068752e4285e256e231d9748757a and https://github.com/onsi/gomega/commit/8c54344b7bc6a1091fe7f1b674ae1cb9cccc850a
Super satisfying :)
...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...