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

Fixed memory leak in concurrent.join #837

Closed
wants to merge 1 commit into from

Conversation

mpilquist
Copy link
Member

In the old implementation, the doneQueue was only processed when open == maxOpen. The new implementation drains the doneQueue eagerly, ensuring timely finalization, while also draining it after reaching the end of the outer stream.

Fixes #834. Alternate to #836.

@mpilquist
Copy link
Member Author

The old implementation was complicated and this fix makes it significantly worse. Not sure if we should merge this or go with @pchlupacek's new implementation of join, which is probably faster.

@pchlupacek
Copy link
Contributor

@mpilquist I am not quite sure that the amount of changes in this variant justifies the old code. I am not sure about the fact you indicating about performance benefit in my rewrite you indicating, but overall I think my rewritten version is easier to reason about.

@mpilquist mpilquist closed this Mar 29, 2017
@mpilquist mpilquist deleted the topic/join-leak branch November 27, 2017 12:42
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

Successfully merging this pull request may close these issues.

2 participants