-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Stabilize rwlock_downgrade
library feature
#143191
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
Stabilize rwlock_downgrade
library feature
#143191
Conversation
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 outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@rfcbot merge |
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. |
2c39d70
to
a3af141
Compare
Gentle bump on the proposed FCP above! @BurntSushi @joshtriplett @m-ou-se |
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 `'rwlock` instead 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 `poison` field in `MappedRwLockWriteGuard` to posion_guard` - Cut off comments at 100 columns - Update the documentation of `downgrade` to match https://github.com rust-lang/pull/143191
a3af141
to
9e3de55
Compare
☔ The latest upstream changes (presumably #145773) made this pull request unmergeable. Please resolve the merge conflicts. |
@rustbot label -S-waiting-on-author |
Bump on the proposed FCP above! @BurntSushi @joshtriplett @m-ou-se (link) |
It's been a little while, nominating just to bump the fcp checkboxes and make sure there aren't any new concerns. @rustbot label +I-libs-api-nominated |
🔔 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. |
@bors r+ |
@bors rollup |
…grade, r=tgross35 Stabilize `rwlock_downgrade` library feature Tracking Issue: rust-lang#128203 Method to be stabilized: ```rust 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 `downgrade` is actually necessary (instead of just unlocking and relocking). If anyone has ideas for making this more concise that would be great!~~ I have made the documentation a bit more clear. Stabilization report: rust-lang#128203 (comment)
Rollup of 5 pull requests Successful merges: - #143191 (Stabilize `rwlock_downgrade` library feature) - #147000 (std: Add Motor OS std library port) - #147670 (some `ErrorGuaranteed` cleanups) - #147716 (Fix some comments) - #147718 (miri: use allocator_shim_contents codegen helper) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 5 pull requests Successful merges: - #143191 (Stabilize `rwlock_downgrade` library feature) - #147000 (std: Add Motor OS std library port) - #147670 (some `ErrorGuaranteed` cleanups) - #147716 (Fix some comments) - #147718 (miri: use allocator_shim_contents codegen helper) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 11 pull requests Successful merges: - #143191 (Stabilize `rwlock_downgrade` library feature) - #147444 (Allow printing a fully-qualified path in `def_path_str`) - #147527 (Update t-compiler beta nomination Zulip msg) - #147670 (some `ErrorGuaranteed` cleanups) - #147676 (Return spans out of `is_doc_comment` to 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
Rollup merge of #143191 - connortsui20:stabilize-rwlock-downgrade, r=tgross35 Stabilize `rwlock_downgrade` library feature Tracking Issue: #128203 Method to be stabilized: ```rust 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 `downgrade` is actually necessary (instead of just unlocking and relocking). If anyone has ideas for making this more concise that would be great!~~ I have made the documentation a bit more clear. Stabilization report: #128203 (comment)
Rollup of 11 pull requests Successful merges: - rust-lang/rust#143191 (Stabilize `rwlock_downgrade` library feature) - rust-lang/rust#147444 (Allow printing a fully-qualified path in `def_path_str`) - rust-lang/rust#147527 (Update t-compiler beta nomination Zulip msg) - rust-lang/rust#147670 (some `ErrorGuaranteed` cleanups) - rust-lang/rust#147676 (Return spans out of `is_doc_comment` to reduce reliance on `.span()` on attributes) - rust-lang/rust#147708 (const `mem::drop`) - rust-lang/rust#147710 (Fix ICE when using contracts on async functions) - rust-lang/rust#147716 (Fix some comments) - rust-lang/rust#147718 (miri: use allocator_shim_contents codegen helper) - rust-lang/rust#147729 (ignore boring locals when explaining why a borrow contains a point due to drop of a live local under polonius) - rust-lang/rust#147742 (Revert unintentional whitespace changes to rustfmt-excluded file) r? `@ghost` `@rustbot` modify labels: rollup
Tracking Issue: #128203
Method to be stabilized:
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 whyI 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)