summaryrefslogtreecommitdiff
path: root/src/mutex
diff options
context:
space:
mode:
authorMica White <botahamec@gmail.com>2024-12-26 11:06:23 -0500
committerMica White <botahamec@gmail.com>2024-12-26 11:26:29 -0500
commit096afea6f13692fddbfad0b07e5377cb2e81dd58 (patch)
tree53c252e3277683e7e8686539fde83e6cc5e1762d /src/mutex
parenta060123077b94f61e3d0802a6977ad547276fd1b (diff)
Rename kill to poison
Diffstat (limited to 'src/mutex')
-rw-r--r--src/mutex/mutex.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mutex/mutex.rs b/src/mutex/mutex.rs
index 4671b4f..2cf6bbf 100644
--- a/src/mutex/mutex.rs
+++ b/src/mutex/mutex.rs
@@ -13,7 +13,7 @@ use crate::poisonable::PoisonFlag;
use super::{Mutex, MutexGuard, MutexRef};
unsafe impl<T: ?Sized, R: RawMutex> RawLock for Mutex<T, R> {
- fn kill(&self) {
+ fn poison(&self) {
self.poison.poison();
}
@@ -22,7 +22,7 @@ unsafe impl<T: ?Sized, R: RawMutex> RawLock for Mutex<T, R> {
// if the closure unwraps, then the mutex will be killed
let this = AssertUnwindSafe(self);
- handle_unwind(|| this.raw.lock(), || self.kill())
+ handle_unwind(|| this.raw.lock(), || self.poison())
}
unsafe fn raw_try_lock(&self) -> bool {
@@ -32,13 +32,13 @@ unsafe impl<T: ?Sized, R: RawMutex> RawLock for Mutex<T, R> {
// if the closure unwraps, then the mutex will be killed
let this = AssertUnwindSafe(self);
- handle_unwind(|| this.raw.try_lock(), || self.kill())
+ handle_unwind(|| this.raw.try_lock(), || self.poison())
}
unsafe fn raw_unlock(&self) {
// if the closure unwraps, then the mutex will be killed
let this = AssertUnwindSafe(self);
- handle_unwind(|| this.raw.unlock(), || self.kill())
+ handle_unwind(|| this.raw.unlock(), || self.poison())
}
// this is the closest thing to a read we can get, but Sharable isn't