diff options
| author | Botahamec <botahamec@outlook.com> | 2024-12-21 11:27:09 -0500 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-12-21 11:27:09 -0500 |
| commit | b2281e6aec631dc7c6d69edef9268ce7e00ed1dc (patch) | |
| tree | 4a3d9059e291016dcfaec8b08ac4aee48a7b815a /src/poisonable/guard.rs | |
| parent | 0ddbb5efa57fb36b2c83a5cd1dc43a5cf426e3ee (diff) | |
Implement lock death, but without any usages
Diffstat (limited to 'src/poisonable/guard.rs')
| -rw-r--r-- | src/poisonable/guard.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/poisonable/guard.rs b/src/poisonable/guard.rs index 30a9b70..6438c2d 100644 --- a/src/poisonable/guard.rs +++ b/src/poisonable/guard.rs @@ -1,7 +1,6 @@ use std::fmt::{Debug, Display}; use std::marker::PhantomData; use std::ops::{Deref, DerefMut}; -use std::sync::atomic::Ordering::Relaxed; use crate::Keyable; @@ -23,7 +22,7 @@ impl<Guard> Drop for PoisonRef<'_, Guard> { fn drop(&mut self) { #[cfg(panic = "unwind")] if std::thread::panicking() { - self.flag.0.store(true, Relaxed); + self.flag.poison(); } } } |
