From d00df37bc92fccaa39e69bf886f9c8cd5522817b Mon Sep 17 00:00:00 2001 From: Botahamec Date: Thu, 27 Oct 2022 22:43:08 -0400 Subject: Created the Mutex type --- src/lock.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/lock.rs') diff --git a/src/lock.rs b/src/lock.rs index df83323..c69ce21 100644 --- a/src/lock.rs +++ b/src/lock.rs @@ -50,14 +50,13 @@ impl Lock { (!self.is_locked.fetch_or(true, Ordering::Acquire)).then_some(Key::new(self)) } - /// Unlock the lock, without a key. + /// Forcibly unlocks the `Lock`. /// /// # Safety /// /// This should only be called if the key to the lock has been "lost". That - /// means the program no longer has a reference to the key, but it has not - /// been dropped. - pub unsafe fn force_unlock(&self) { + /// means the program no longer has a reference to the key. + unsafe fn force_unlock(&self) { self.is_locked.store(false, Ordering::Release); } -- cgit v1.2.3