-
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
Example about explicit mutex dropping #73104
Example about explicit mutex dropping #73104
Conversation
Co-authored-by: LeSeulArtichaut <leseulartichaut@gmail.com>
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.
NB: Review comments I made are entirely a suggestion, they in no way mean I reject (were comments not resolved) or approve (once/if the comments are resolved) the PR.
@nagisa I removed a lot of comments. Aside from the ones about the dummy work, there is only the big comment about deadlocking in main, which explains pretty much everything (I hope). Do not hesitate to tell me if you see something else I can improve ! |
@rustbot modify labels: C-enhancement, T-doc, T-libs |
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Based on the review made by dtolnay.
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.
Thanks!
@bors r+ |
📌 Commit c010e71 has been approved by |
I'm sorry you had to do a formatting commit, running |
…ample, r=dtolnay Example about explicit mutex dropping Fixes rust-lang#67457. Following the remarks made in rust-lang#73074, I added an example on the main `Mutex` type, with a situation where there is mutable data and a computation result. In my testing it is effectively needed to explicitly drop the lock, else it deadlocks. r? @dtolnay because you were the one to review the previous PR.
@bors rollup |
…ample, r=dtolnay Example about explicit mutex dropping Fixes rust-lang#67457. Following the remarks made in rust-lang#73074, I added an example on the main `Mutex` type, with a situation where there is mutable data and a computation result. In my testing it is effectively needed to explicitly drop the lock, else it deadlocks. r? @dtolnay because you were the one to review the previous PR.
Rollup of 10 pull requests Successful merges: - rust-lang#72707 (Use min_specialization in the remaining rustc crates) - rust-lang#72740 (On recursive ADT, provide indirection structured suggestion) - rust-lang#72879 (Miri: avoid tracking current location three times) - rust-lang#72938 (Stabilize Option::zip) - rust-lang#73086 (Rename "cyclone" to "apple-a7" per changes in upstream LLVM) - rust-lang#73104 (Example about explicit mutex dropping) - rust-lang#73139 (Add methods to go from a nul-terminated Vec<u8> to a CString) - rust-lang#73296 (Remove vestigial CI job msvc-aux.) - rust-lang#73304 (Revert heterogeneous SocketAddr PartialEq impls) - rust-lang#73331 (extend network support for HermitCore) Failed merges: r? @ghost
Fixes #67457.
Following the remarks made in #73074, I added an example on the main
Mutex
type, with a situation where there is mutable data and a computation result.In my testing it is effectively needed to explicitly drop the lock, else it deadlocks.
r? @dtolnay because you were the one to review the previous PR.