summaryrefslogtreecommitdiff
path: root/src/poisonable/flag.rs
diff options
context:
space:
mode:
authorBotahamec <botahamec@outlook.com>2024-12-21 11:27:09 -0500
committerBotahamec <botahamec@outlook.com>2024-12-21 11:27:09 -0500
commitb2281e6aec631dc7c6d69edef9268ce7e00ed1dc (patch)
tree4a3d9059e291016dcfaec8b08ac4aee48a7b815a /src/poisonable/flag.rs
parent0ddbb5efa57fb36b2c83a5cd1dc43a5cf426e3ee (diff)
Implement lock death, but without any usages
Diffstat (limited to 'src/poisonable/flag.rs')
-rw-r--r--src/poisonable/flag.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/poisonable/flag.rs b/src/poisonable/flag.rs
index be38a38..a692685 100644
--- a/src/poisonable/flag.rs
+++ b/src/poisonable/flag.rs
@@ -16,6 +16,10 @@ impl PoisonFlag {
pub fn clear_poison(&self) {
self.0.store(false, Relaxed)
}
+
+ pub fn poison(&self) {
+ self.0.store(true, Relaxed);
+ }
}
#[cfg(not(panic = "unwind"))]