-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 holding Poh lock #8838
Remove holding Poh lock #8838
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I wouldn't expect it to be held, but good find if so..
Codecov Report
@@ Coverage Diff @@
## master #8838 +/- ##
========================================
- Coverage 80% 80% -0.1%
========================================
Files 265 265
Lines 57546 57549 +3
========================================
+ Hits 46072 46073 +1
- Misses 11474 11476 +2 |
automerge (cherry picked from commit 53b8d0d)
@sakridge hehe yeah, the lock doesn't go out of scope until the end of the block. For example, in this example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=eb85cd168d706fb955dd40701c79c0d8, |
@sakridge I wonder if we have this pattern anywhere else in the codebase xD, with RwLock's as well |
Same, that's super unexpected. Maybe a compiler bug even? |
Problem
Poh lock is held during expensive operations by statements of the type
if let Some(_) = poh.lock().unwrap()...
Summary of Changes
Rework
Fixes #