1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-18 05:37:52 +02:00

Clarify that each philosopher should think/eat 100 times (#900)

Clarify that each philosopher should think/eat 100 times.

Folks who have hazy memories of the philosopher dining problem may
interpret the original instructions as "make each philosopher think and
eat once". This interpretation loses a critical detail, because the
resulting code is highly unlikely to deadlock in practice, even without
breaking the symmetry.
This commit is contained in:
Victor Costan 2023-07-03 23:41:54 -07:00 committed by GitHub
parent fe8c374d3b
commit 6df4ba24dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ blanks, and test that `cargo run` does not deadlock:
// Create philosophers
// Make them think and eat
// Make each of them think and eat 100 times
// Output their thoughts
}