Name Description Size
condvar.rs 35406
deadlock.rs \[Experimental\] Deadlock detection This feature is optional and can be enabled via the `deadlock_detection` feature flag. # Example ``` #[cfg(feature = "deadlock_detection")] { // only for #[cfg] use std::thread; use std::time::Duration; use parking_lot::deadlock; // Create a background thread which checks for deadlocks every 10s thread::spawn(move || { loop { thread::sleep(Duration::from_secs(10)); let deadlocks = deadlock::check_deadlock(); if deadlocks.is_empty() { continue; } println!("{} deadlocks detected", deadlocks.len()); for (i, threads) in deadlocks.iter().enumerate() { println!("Deadlock #{}", i); for t in threads { println!("Thread Id {:#?}", t.thread_id()); println!("{:#?}", t.backtrace()); } } } }); } // only for #[cfg] ``` 6113
elision.rs 3676
fair_mutex.rs 9178
lib.rs This library provides implementations of `Mutex`, `RwLock`, `Condvar` and `Once` that are smaller, faster and more flexible than those in the Rust standard library. It also provides a `ReentrantMutex` type. 2030
mutex.rs 10085
once.rs 13934
raw_fair_mutex.rs 1634
raw_mutex.rs 11794
raw_rwlock.rs 38030
remutex.rs 4957
rwlock.rs 18843
util.rs 1017