summaryrefslogtreecommitdiff
path: root/examples/dining_philosophers.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/dining_philosophers.rs
parent5eaa4fe1d3bfcda696122ba3d6b4914dba19ef96 (diff)
Documentation
Diffstat (limited to 'examples/dining_philosophers.rs')
-rw-r--r--examples/dining_philosophers.rs2
1 files changed, 1 insertions, 1 deletions
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