Stabilize rwlock_downgrade library feature by connortsui20 · Pull Request #143191 · rust-lang/rust (original) (raw)
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
Tracking Issue: #128203
Method to be stabilized:
impl<'a, T: ?Sized> RwLockWriteGuard<'a, T> { pub fn downgrade(s: Self) -> RwLockReadGuard<'a, T> {} }
I would like to point out that my documentation comment is longer than ideal, but at the same time I don't really know how else to show why I have made the documentation a bit more clear.downgrade is actually necessary (instead of just unlocking and relocking). If anyone has ideas for making this more concise that would be great!
Stabilization report: #128203 (comment)
r? @tgross35
rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the library team, which will review and decide on the PR/issue.
labels
This means that we can never go back to pthreads to back our locks, but that seems fine since the pthreads API has many issues around UB and movability.
@rfcbot merge
This comment was marked as outdated.
This comment was marked as resolved.
Amanieu added T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
and removed T-libs
Relevant to the library team, which will review and decide on the PR/issue.
labels
This comment was marked as outdated.
This comment was marked as outdated.
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed.
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!
See this document for info about what commands tagged team members can give me.
connortsui20 added a commit to connortsui20/rust that referenced this pull request
This commit is a purely cosmetic change to the documentation and
ordering of items in the rwlock.rs file.
List of changes (lots of small things):
- Clean up some of the existing field doc comments
- Add documentation for every field in struct definitions
- Consolidate related implementation blocks (1 implementation block per guard instead of 2)
- Use the lifetime name
'rwlockinstead of'a - Reorder implementation blocks to be consistent across the entire file
(follows the order
ReadGuard,WriteGuard,MappedReadGuard, MappedWriteGuard`) - Move simple trait implementations to the bottom of the file
- Rename the
poisonfield inMappedRwLockWriteGuardto posion_guard` - Cut off comments at 100 columns
- Update the documentation of
downgradeto match https://github.com rust-lang/pull/143191
🔔 This is now entering its final comment period, as per the review above. 🔔
The final comment period, with a disposition to merge, as per the review above, is now complete.
As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.
This will be merged soon.
esote mentioned this pull request
📌 Commit 780319a has been approved by tgross35
It is now in the queue for this repository.
bors added the S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…grade, r=tgross35
Stabilize rwlock_downgrade library feature
Tracking Issue: rust-lang#128203
Method to be stabilized:
impl<'a, T: ?Sized> RwLockWriteGuard<'a, T> {
pub fn downgrade(s: Self) -> RwLockReadGuard<'a, T> {}
}I would like to point out that my documentation comment is longer than ideal, but at the same time I don't really know how else to show why I have made the documentation a bit more clear.downgrade is actually necessary (instead of just unlocking and relocking). If anyone has ideas for making this more concise that would be great!
Stabilization report: rust-lang#128203 (comment)
bors added a commit that referenced this pull request
Rollup of 5 pull requests
Successful merges:
- #143191 (Stabilize
rwlock_downgradelibrary feature) - #147000 (std: Add Motor OS std library port)
- #147670 (some
ErrorGuaranteedcleanups) - #147716 (Fix some comments)
- #147718 (miri: use allocator_shim_contents codegen helper)
r? @ghost
@rustbot modify labels: rollup
bors added a commit that referenced this pull request
Rollup of 5 pull requests
Successful merges:
- #143191 (Stabilize
rwlock_downgradelibrary feature) - #147000 (std: Add Motor OS std library port)
- #147670 (some
ErrorGuaranteedcleanups) - #147716 (Fix some comments)
- #147718 (miri: use allocator_shim_contents codegen helper)
r? @ghost
@rustbot modify labels: rollup
bors added a commit that referenced this pull request
Rollup of 11 pull requests
Successful merges:
- #143191 (Stabilize
rwlock_downgradelibrary feature) - #147444 (Allow printing a fully-qualified path in
def_path_str) - #147527 (Update t-compiler beta nomination Zulip msg)
- #147670 (some
ErrorGuaranteedcleanups) - #147676 (Return spans out of
is_doc_commentto reduce reliance on.span()on attributes) - #147708 (const
mem::drop) - #147710 (Fix ICE when using contracts on async functions)
- #147716 (Fix some comments)
- #147718 (miri: use allocator_shim_contents codegen helper)
- #147729 (ignore boring locals when explaining why a borrow contains a point due to drop of a live local under polonius)
- #147742 (Revert unintentional whitespace changes to rustfmt-excluded file)
r? @ghost
@rustbot modify labels: rollup
rust-timer added a commit that referenced this pull request
Rollup merge of #143191 - connortsui20:stabilize-rwlock-downgrade, r=tgross35
Stabilize rwlock_downgrade library feature
Tracking Issue: #128203
Method to be stabilized:
impl<'a, T: ?Sized> RwLockWriteGuard<'a, T> {
pub fn downgrade(s: Self) -> RwLockReadGuard<'a, T> {}
}I would like to point out that my documentation comment is longer than ideal, but at the same time I don't really know how else to show why I have made the documentation a bit more clear.downgrade is actually necessary (instead of just unlocking and relocking). If anyone has ideas for making this more concise that would be great!
Stabilization report: #128203 (comment)
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request
…grade, r=tgross35
Stabilize rwlock_downgrade library feature
Tracking Issue: rust-lang#128203
Method to be stabilized:
impl<'a, T: ?Sized> RwLockWriteGuard<'a, T> {
pub fn downgrade(s: Self) -> RwLockReadGuard<'a, T> {}
}I would like to point out that my documentation comment is longer than ideal, but at the same time I don't really know how else to show why I have made the documentation a bit more clear.downgrade is actually necessary (instead of just unlocking and relocking). If anyone has ideas for making this more concise that would be great!
Stabilization report: rust-lang#128203 (comment)
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request
…iaskrgr
Rollup of 11 pull requests
Successful merges:
- rust-lang#143191 (Stabilize
rwlock_downgradelibrary feature) - rust-lang#147444 (Allow printing a fully-qualified path in
def_path_str) - rust-lang#147527 (Update t-compiler beta nomination Zulip msg)
- rust-lang#147670 (some
ErrorGuaranteedcleanups) - rust-lang#147676 (Return spans out of
is_doc_commentto reduce reliance on.span()on attributes) - rust-lang#147708 (const
mem::drop) - rust-lang#147710 (Fix ICE when using contracts on async functions)
- rust-lang#147716 (Fix some comments)
- rust-lang#147718 (miri: use allocator_shim_contents codegen helper)
- rust-lang#147729 (ignore boring locals when explaining why a borrow contains a point due to drop of a live local under polonius)
- rust-lang#147742 (Revert unintentional whitespace changes to rustfmt-excluded file)
r? @ghost
@rustbot modify labels: rollup