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

Don't advance the epoch in try_collect until after doing the collection. #50

Merged
merged 1 commit into from
Feb 9, 2016
Merged

Don't advance the epoch in try_collect until after doing the collection. #50

merged 1 commit into from
Feb 9, 2016

Conversation

msullivan
Copy link
Contributor

In try_collect(), it is important to reclaim memory from two epochs
ago before advancing the local epoch. As soon as the local epoch has
been advanced, another thread could advance the epoch and start
putting garbage in that same bag.

Closes #46.

In try_collect(), it is important to reclaim memory from two epochs
ago *before* advancing the local epoch. As soon as the local epoch has
been advanced, another thread could advance the epoch and start
putting garbage in that same bag.

Closes #46.
@aturon
Copy link
Collaborator

aturon commented Feb 9, 2016

Thanks so much for tracking this down!

aturon added a commit that referenced this pull request Feb 9, 2016
Don't advance the epoch in try_collect until after doing the collection.
@aturon aturon merged commit eab00e9 into crossbeam-rs:master Feb 9, 2016
@aturon aturon mentioned this pull request Feb 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants