diff options
| author | Mica White <botahamec@outlook.com> | 2024-03-11 16:33:26 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2024-03-11 16:33:26 -0400 |
| commit | 462fc2d9aab8f0cba680caec344e4c388e9901b1 (patch) | |
| tree | 6b401c5ed4920c2ec8093d5c49976fe0b72573c2 /examples/dining_philosophers.rs | |
| parent | 5eaa4fe1d3bfcda696122ba3d6b4914dba19ef96 (diff) | |
Documentation
Diffstat (limited to 'examples/dining_philosophers.rs')
| -rw-r--r-- | examples/dining_philosophers.rs | 2 |
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 |
