diff options
| author | Botahamec <botahamec@outlook.com> | 2022-10-27 22:43:08 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2022-10-27 22:43:08 -0400 |
| commit | d00df37bc92fccaa39e69bf886f9c8cd5522817b (patch) | |
| tree | c277d1447f104146fa9ba02d842867bdfcfd7ac9 /src/lock.rs | |
| parent | 51a3c4f507448190b8ebec8f143a6403eaeadcbf (diff) | |
Created the Mutex type
Diffstat (limited to 'src/lock.rs')
| -rw-r--r-- | src/lock.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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); } |
