Skip to content

Commit

Permalink
Replace 'mutex' with 'lock' in RwLock documentation
Browse files Browse the repository at this point in the history
When copying the documentation for `clear_poison` from Mutex, not every occurence of 'mutex' was replaced with 'lock'.
  • Loading branch information
Kriskras99 authored Sep 19, 2023
1 parent ae9c330 commit cdf25c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/sync/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ impl<T: ?Sized> RwLock<T> {
///
/// If the lock is poisoned, it will remain poisoned until this function is called. This allows
/// recovering from a poisoned state and marking that it has recovered. For example, if the
/// value is overwritten by a known-good value, then the mutex can be marked as un-poisoned. Or
/// value is overwritten by a known-good value, then the lock can be marked as un-poisoned. Or
/// possibly, the value could be inspected to determine if it is in a consistent state, and if
/// so the poison is removed.
///
Expand All @@ -397,7 +397,7 @@ impl<T: ?Sized> RwLock<T> {
///
/// let _ = thread::spawn(move || {
/// let _lock = c_lock.write().unwrap();
/// panic!(); // the mutex gets poisoned
/// panic!(); // the lock gets poisoned
/// }).join();
///
/// assert_eq!(lock.is_poisoned(), true);
Expand Down

0 comments on commit cdf25c9

Please sign in to comment.