-
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
doc: clarify Mutex::try_lock, etc. errors #85529
Conversation
Clarify error returns from Mutex::try_lock, RwLock::try_read, RwLock::try_write to make it more obvious that both poisoning and the lock being already locked are possible errors.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
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.
Overall LGTM with one nit.
Use "the `WouldBlock` error" instead of "the error `WouldBlock`", etc.
Thanks for the review! I've pushed an update. |
Thanks! @bors r+ rollup |
📌 Commit 0e4f8cb has been approved by |
doc: clarify Mutex::try_lock, etc. errors Clarify error returns from Mutex::try_lock, RwLock::try_read, RwLock::try_write to make it more obvious that both poisoning and the lock being already locked are possible errors.
doc: clarify Mutex::try_lock, etc. errors Clarify error returns from Mutex::try_lock, RwLock::try_read, RwLock::try_write to make it more obvious that both poisoning and the lock being already locked are possible errors.
Rollup of 12 pull requests Successful merges: - rust-lang#84048 (Avoid CJK legacy fonts in Windows) - rust-lang#85529 (doc: clarify Mutex::try_lock, etc. errors) - rust-lang#85590 (Fix bootstrap using host exe suffix for cargo) - rust-lang#85610 (Fix pointer provenance in <[T]>::copy_within) - rust-lang#85623 (Remove stray .stderr files) - rust-lang#85645 (Demote `ControlFlow::{from|into}_try` to `pub(crate)`) - rust-lang#85647 (Revert "Move llvm submodule updates to rustbuild") - rust-lang#85666 (Document shared_from_cow functions) - rust-lang#85668 (Fix tasklist example in rustdoc book.) - rust-lang#85672 (Move stability attribute for items under the `ip` feature) - rust-lang#85699 (Update books) - rust-lang#85701 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Clarify error returns from Mutex::try_lock, RwLock::try_read,
RwLock::try_write to make it more obvious that both poisoning
and the lock being already locked are possible errors.