Skip to content

book: Fix final dining philosophers program output #30569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/doc/book/dining-philosophers.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,10 @@ You’ll notice we can introduce a new binding to `table` here, and it will
shadow the old one. This is often used so that you don’t need to come up with
two unique names.

With this, our program works! Only two philosophers can eat at any one time,
and so you’ll get some output like this:
With this, our program works! No more than two philosophers can eat at any one
time, and so you’ll get some output like this (due to the arbitrary order of
execution of spawned threads, your output may be different -- and may be
different each time you run your program):

```text
Gilles Deleuze is eating.
Expand Down