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

Less Mutex poisoning #527

Merged
merged 1 commit into from
Feb 24, 2024
Merged

Less Mutex poisoning #527

merged 1 commit into from
Feb 24, 2024

Conversation

asomers
Copy link
Owner

@asomers asomers commented Dec 9, 2023

If a test case panics while holding a static method's internal Mutex locked, for example by violating a times() constraint, then clear the Mutex's poison during Drop. We're going to delete all of its Expectations anyway, so there's no data to be poisoned.

Requires nightly.

Fixes #515

@asomers
Copy link
Owner Author

asomers commented Dec 9, 2023

This PR depends on the rust-lang/rust#96469 feature, which should be merged soon.

If a test case panics while holding a static method's internal Mutex
locked, for example by violating a times() constraint, then clear the
Mutex's poison during Drop.  We're going to delete all of its
Expectations anyway, so there's no data to be poisoned.

Requires nightly.

Fixes #515
@asomers asomers merged commit b4c7318 into master Feb 24, 2024
3 checks passed
@asomers asomers deleted the clear_poison branch February 24, 2024 22:54
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.

Reduce mutex poisoning
1 participant