Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work channel in gmeasure.Experiment.Sample is not closed upon return #579

Open
davidhsingyuchen opened this issue Aug 27, 2022 · 4 comments

Comments

@davidhsingyuchen
Copy link
Contributor

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!

@onsi
Copy link
Owner

onsi commented Sep 19, 2022

oh hey - sorry for the delay. that's a good catch. we need to close the work channel.

@thediveo
Copy link
Collaborator

cough gleak 😁

@onsi
Copy link
Owner

onsi commented Sep 19, 2022

In fact! 119d4ce and 8c54344

Super satisfying :)

@thediveo
Copy link
Collaborator

...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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants