Expand description
Tracing mutex wrappers for locks found in std::sync
.
This module provides wrappers for std::sync
primitives with exactly the same API and
functionality as their counterparts, with the exception that their acquisition order is tracked.
Dedicated wrappers that provide the dependency tracing can be found in the tracing
module.
The original primitives are available from std::sync
, imported as raw
for convenience.
If debug assertions are enabled, this module imports the primitives from tracing
, otherwise
it will import from raw
.
let mutex = Mutex::new(());
mutex.lock().unwrap();
let rwlock = RwLock::new(());
rwlock.read().unwrap();
Re-exports§
pub use tracing::Condvar;
pub use tracing::Mutex;
pub use tracing::MutexGuard;
pub use tracing::Once;
pub use tracing::OnceLock;
pub use tracing::RwLock;
pub use tracing::RwLockReadGuard;
pub use tracing::RwLockWriteGuard;
Modules§
- Useful synchronization primitives.
- Dependency tracing versions of
std::sync
.