diff options
| author | Botahamec <botahamec@outlook.com> | 2024-05-22 17:27:35 -0400 |
|---|---|---|
| committer | Botahamec <botahamec@outlook.com> | 2024-05-22 17:27:35 -0400 |
| commit | ef191a3e8ecf4093fcd08036e35012c1af173a08 (patch) | |
| tree | 9a6986986ad8392ae147c64c436214fa290773d7 /examples/double_mutex.rs | |
| parent | ebbe3cfce28914d776f3e5f89894fab50911c57e (diff) | |
Documentation for types
Diffstat (limited to 'examples/double_mutex.rs')
| -rw-r--r-- | examples/double_mutex.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/double_mutex.rs b/examples/double_mutex.rs index 882fc46..ea61f0d 100644 --- a/examples/double_mutex.rs +++ b/examples/double_mutex.rs @@ -1,6 +1,5 @@ use std::thread; -use happylock::collection::RetryingLockCollection; use happylock::{collection::RefLockCollection, Mutex, ThreadKey}; const N: usize = 10; @@ -12,7 +11,7 @@ fn main() { for _ in 0..N { let th = thread::spawn(move || { let key = ThreadKey::get().unwrap(); - let lock = RetryingLockCollection::new_ref(&DATA); + let lock = RefLockCollection::new(&DATA); let mut guard = lock.lock(key); *guard.1 = (100 - *guard.0).to_string(); *guard.0 += 1; |
