summaryrefslogtreecommitdiff
path: root/examples/list.rs
diff options
context:
space:
mode:
authorMica White <botahamec@outlook.com>2024-03-11 16:33:26 -0400
committerMica White <botahamec@outlook.com>2024-03-11 16:33:26 -0400
commit462fc2d9aab8f0cba680caec344e4c388e9901b1 (patch)
tree6b401c5ed4920c2ec8093d5c49976fe0b72573c2 /examples/list.rs
parent5eaa4fe1d3bfcda696122ba3d6b4914dba19ef96 (diff)
Documentation
Diffstat (limited to 'examples/list.rs')
-rw-r--r--examples/list.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/list.rs b/examples/list.rs
index 14117ee..3b03f2d 100644
--- a/examples/list.rs
+++ b/examples/list.rs
@@ -29,7 +29,7 @@ fn main() {
let mut threads = Vec::new();
for _ in 0..N {
let th = thread::spawn(move || {
- let mut key = ThreadKey::lock().unwrap();
+ let mut key = ThreadKey::get().unwrap();
loop {
let mut data = Vec::new();
for _ in 0..3 {
@@ -55,7 +55,7 @@ fn main() {
_ = th.join();
}
- let key = ThreadKey::lock().unwrap();
+ let key = ThreadKey::get().unwrap();
let data = LockCollection::new_ref(&DATA);
let data = data.lock(key);
for val in &*data {