-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Remove MutexGuard::map, as it is not safe in combination with Condvar. #31428
Conversation
It could return in the future if it returned a different guard type, which could not be used with Condvar, otherwise it is unsafe as another thread can invalidate an "inner" reference during a Condvar::wait. cc rust-lang#27746
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Whoops, nice catch! cc @rust-lang/libs |
Bummer. I wonder if we can leave a comment in somewhere noting that this is intentionally missing so it doesn't get added back later by someone. |
It could return in the future if it returned a different guard type, which could not be used with Condvar, otherwise it is unsafe as another thread can invalidate an "inner" reference during a Condvar::wait. cc #27746
Hm, shouldn't this have been |
The feature only existed for like 2 days and had serious soundness issues.
|
Oh, sorry, yeah. For some reason, I had in my mind that |
It could return in the future if it returned a different guard type, which
could not be used with Condvar, otherwise it is unsafe as another thread
can invalidate an "inner" reference during a Condvar::wait.
cc #27746