From 462fc2d9aab8f0cba680caec344e4c388e9901b1 Mon Sep 17 00:00:00 2001 From: Mica White Date: Mon, 11 Mar 2024 16:33:26 -0400 Subject: Documentation --- examples/dining_philosophers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/dining_philosophers.rs') diff --git a/examples/dining_philosophers.rs b/examples/dining_philosophers.rs index f8657df..35aa330 100644 --- a/examples/dining_philosophers.rs +++ b/examples/dining_philosophers.rs @@ -46,7 +46,7 @@ struct Philosopher { impl Philosopher { fn cycle(&self) { - let key = ThreadKey::lock().unwrap(); + let key = ThreadKey::get().unwrap(); thread::sleep(Duration::from_secs(1)); // safety: no philosopher asks for the same fork twice -- cgit v1.2.3