summaryrefslogtreecommitdiff
path: root/src/lockable.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2024-03-08 12:18:41 -0500
committerMica White <botahamec@outlook.com>2024-03-08 12:18:41 -0500
commit03d0cdb7145042ce51c9eb98bfd081a4f10fe8e1 (patch)
tree0d2b753760194661a5a5a8f2bfd60a822e116c47 /src/lockable.rs
parent6b6f207965cc71fa9a7a056a1c89675116abec74 (diff)
Keyable
Diffstat (limited to 'src/lockable.rs')
-rw-r--r--src/lockable.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lockable.rs b/src/lockable.rs
index b6ba7d6..cda4e13 100644
--- a/src/lockable.rs
+++ b/src/lockable.rs
@@ -31,6 +31,8 @@ pub unsafe trait Lockable<'a>: sealed::Sealed {
/// * Use this without ownership or mutable access to the [`ThreadKey`],
/// which should last as long as the return value is alive.
/// * Call this on multiple locks without unlocking first.
+ ///
+ /// [`ThreadKey`]: `crate::key::ThreadKey`
unsafe fn lock(&'a self) -> Self::Output;
/// Attempt to lock without blocking.
@@ -42,6 +44,8 @@ pub unsafe trait Lockable<'a>: sealed::Sealed {
/// It is undefined behavior to use this without ownership or mutable
/// access to the [`ThreadKey`], which should last as long as the return
/// value is alive.
+ ///
+ /// [`ThreadKey`]: `crate::key::ThreadKey`
unsafe fn try_lock(&'a self) -> Option<Self::Output>;
/// Release the lock