summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2024-03-10 20:42:37 -0400
committerMica White <botahamec@outlook.com>2024-03-10 20:42:37 -0400
commit815c0adedd6207eb406c67ea09c2634f304f8adf (patch)
treeab3f8291f2315c6c46ea472260023c14a2880261 /src/lib.rs
parentfe67aa262f1b04fb6c38683d9221c3a2fafcc35a (diff)
More reorganization
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lib.rs b/src/lib.rs
index dbe095c..38279fa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -6,24 +6,19 @@
#![allow(clippy::module_inception)]
mod collection;
+mod key;
mod lockable;
-pub mod key;
pub mod mutex;
pub mod rwlock;
pub use collection::LockCollection;
+pub use key::{Keyable, ThreadKey};
pub use lockable::{Lockable, OwnedLockable};
#[cfg(feature = "spin")]
pub use mutex::SpinLock;
-/// The key for the current thread.
-///
-/// Only one of these exist per thread. To get the current thread's key, call
-/// [`ThreadKey::lock`]. If the `ThreadKey` is dropped, it can be reobtained.
-pub type ThreadKey = key::Key<'static>;
-
/// A mutual exclusion primitive useful for protecting shared data, which cannot deadlock.
///
/// By default, this uses `parking_lot` as a backend.