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

test case for out-of-order drop #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kazcw
Copy link

@kazcw kazcw commented Nov 10, 2018

Demonstrates issue #6

@mehcode
Copy link
Owner

mehcode commented Nov 13, 2018

Thanks for writing up a test for this. Perhaps a keyed ReentrantMutex from parking_lot could be an answer?

@kazcw
Copy link
Author

kazcw commented Nov 15, 2018

This bug isn't related to threading, so it can't be fixed with a mutex. It's inherent to the current API, which doesn't enforce the requirement that guards that may be for the same address are dropped in the reverse of the order in which they are created. I have a proposed approach to fixing it in #6.

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.

None yet

2 participants