From 97b33ddd9042ef4b7e03f3c1ebdd77517ab853e8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 27 Mar 2022 12:47:08 +0100 Subject: [PATCH] Mutex debug: Add example (commented out) of engaging it Signed-off-by: Ian Jackson --- src/prelude.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/prelude.rs b/src/prelude.rs index a9d717ba..ac970131 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -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; -- 2.30.2