diff options
| author | Mica White <botahamec@outlook.com> | 2024-03-10 19:40:23 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2024-03-10 19:40:23 -0400 |
| commit | e8d25c9e6e7d5c3a5a14219fc77ea98760cef790 (patch) | |
| tree | 9436371726e0250ad38d33fa24fbf33271d4ec13 /src/mutex.rs | |
| parent | 0c519b6c7801aa6a085551c8e144f0336e615870 (diff) | |
Make spin and parking lot optional
Diffstat (limited to 'src/mutex.rs')
| -rw-r--r-- | src/mutex.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mutex.rs b/src/mutex.rs index e7a439c..0d67f33 100644 --- a/src/mutex.rs +++ b/src/mutex.rs @@ -8,9 +8,11 @@ use lock_api::RawMutex; use crate::key::Keyable; /// A spinning mutex +#[cfg(feature = "spin")] pub type SpinLock<T> = Mutex<T, spin::Mutex<()>>; /// A parking lot mutex +#[cfg(feature = "parking_lot")] pub type ParkingMutex<T> = Mutex<T, parking_lot::RawMutex>; /// A mutual exclusion primitive useful for protecting shared data, which |
