chiark / gitweb /
Mutex debug: Add example (commented out) of engaging it
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Mar 2022 11:47:08 +0000 (12:47 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 Mar 2022 23:50:50 +0000 (00:50 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/prelude.rs

index a9d717ba79637cf3a2e636d452bdcb3824098bfc..ac9701310fa1e5480d5a8133898f07239003e144 100644 (file)
@@ -80,8 +80,6 @@ pub use nix::time::clock_gettime;
 pub use num_derive::{ToPrimitive, FromPrimitive};
 pub use num_traits::{Bounded, FromPrimitive, ToPrimitive};
 pub use ordered_float::OrderedFloat;
-pub use parking_lot::{Mutex, MutexGuard};
-pub use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard};
 pub use percent_encoding::percent_decode_str;
 pub use percent_encoding::utf8_percent_encode;
 pub use percent_encoding::NON_ALPHANUMERIC;
@@ -111,6 +109,13 @@ pub use vecdeque_stableix::Offset as StableIndexOffset;
 pub use void::{unreachable, Void, ResultVoidExt, ResultVoidErrExt};
 pub use crate::imports::zipfile::{self, read::ZipFile, result::ZipError};
 
+// No debug version of this
+pub use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard};
+
+// Swap this over for debugging
+pub use parking_lot::{Mutex, MutexGuard};
+//pub use crate::debugmutex::{Mutex, MutexGuard};
+
 use nix::time::ClockId;
 pub const CLOCK_REALTIME : ClockId = ClockId::CLOCK_REALTIME ;
 pub const CLOCK_MONOTONIC: ClockId = ClockId::CLOCK_MONOTONIC;