Module tracing_mutex::stdsync

source ·
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(());

let rwlock = RwLock::new(());;