You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-01 12:44:55 +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:
@ -32,7 +32,7 @@ blanks, and test that `cargo run` does not deadlock:
|
|||||||
|
|
||||||
// Create philosophers
|
// Create philosophers
|
||||||
|
|
||||||
// Make them think and eat
|
// Make each of them think and eat 100 times
|
||||||
|
|
||||||
// Output their thoughts
|
// Output their thoughts
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user