Example about explicit mutex dropping#73104
Merged
bors merged 7 commits intorust-lang:masterfrom Jun 15, 2020
Merged
Conversation
Co-authored-by: LeSeulArtichaut <leseulartichaut@gmail.com>
nagisa
reviewed
Jun 9, 2020
Member
nagisa
left a comment
There was a problem hiding this comment.
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.
Contributor
Author
|
@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 ! |
Contributor
Author
|
@rustbot modify labels: C-enhancement, T-doc, T-libs |
dtolnay
requested changes
Jun 13, 2020
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Based on the review made by dtolnay.
Member
|
@bors r+ |
Collaborator
|
📌 Commit c010e71 has been approved by |
Contributor
Author
|
I'm sorry you had to do a formatting commit, running |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Jun 14, 2020
…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.
Member
|
@bors rollup |
RalfJung
added a commit
to RalfJung/rust
that referenced
this pull request
Jun 15, 2020
…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.
This was referenced Jun 15, 2020
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 15, 2020
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #67457.
Following the remarks made in #73074, I added an example on the main
Mutextype, 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.