Skip to content

Commit

Permalink
Mark MappedRwLockWriteGuard::downgrade as deprecated
Browse files Browse the repository at this point in the history
See #198
  • Loading branch information
Amanieu committed Jan 4, 2020
1 parent 4ae81b3 commit d1b4469
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lock_api/src/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,10 @@ impl<'a, R: RawRwLockDowngrade + 'a, T: ?Sized + 'a> MappedRwLockWriteGuard<'a,
/// Note that if there are any writers currently waiting to take the lock
/// then other readers may not be able to acquire the lock even if it was
/// downgraded.
#[deprecated(
since = "0.3.3",
note = "This function is unsound and will be removed in the future, see issue #198"
)]
pub fn downgrade(s: Self) -> MappedRwLockReadGuard<'a, R, T> {
s.raw.downgrade();
let raw = s.raw;
Expand Down

0 comments on commit d1b4469

Please sign in to comment.