summaryrefslogtreecommitdiff
path: root/examples/double_mutex.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2024-03-08 15:34:07 -0500
committerMica White <botahamec@outlook.com>2024-03-08 15:34:07 -0500
commite98635ad8f9015f3749a8d90099ebd37bfb8100c (patch)
tree31aed6268ffcdad0407fa48e52d79ca288a216b3 /examples/double_mutex.rs
parent44347114329545f6b53a621e09a596c53884413a (diff)
Allow moves
Diffstat (limited to 'examples/double_mutex.rs')
-rw-r--r--examples/double_mutex.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/double_mutex.rs b/examples/double_mutex.rs
index 18460e4..1469f45 100644
--- a/examples/double_mutex.rs
+++ b/examples/double_mutex.rs
@@ -1,12 +1,11 @@
use std::thread;
-use happylock::mutex::{Mutex, SpinLock};
-use happylock::{LockGuard, ThreadKey};
+use happylock::{LockGuard, Mutex, ThreadKey};
const N: usize = 10;
-static DATA_1: SpinLock<i32> = Mutex::new(0);
-static DATA_2: SpinLock<String> = Mutex::new(String::new());
+static DATA_1: Mutex<i32> = Mutex::new(0);
+static DATA_2: Mutex<String> = Mutex::new(String::new());
fn main() {
for _ in 0..N {