Skip to content

Commit 4ef8d82

Browse files
committed
she -> [they] in Dining Philosophers
Also, when checking for common gendered words elsewhere, I found one 'he', moved to 'they' as well. #25640 (comment)
1 parent 7bd3bbd commit 4ef8d82

File tree

2 files changed

+41
-40
lines changed

2 files changed

+41
-40
lines changed

src/doc/trpl/dining-philosophers.md

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,22 @@ called ‘the dining philosophers’. It was originally conceived by Dijkstra in
77
[paper]: http://www.usingcsp.com/cspbook.pdf
88

99
> In ancient times, a wealthy philanthropist endowed a College to accommodate
10-
> five eminent philosophers. Each philosopher had a room in which she could
10+
> five eminent philosophers. Each philosopher had a room in which [they] could
1111
> engage in her professional activity of thinking; there was also a common
1212
> dining room, furnished with a circular table, surrounded by five chairs, each
1313
> labelled by the name of the philosopher who was to sit in it. They sat
1414
> anticlockwise around the table. To the left of each philosopher there was
1515
> laid a golden fork, and in the centre stood a large bowl of spaghetti, which
16-
> was constantly replenished. A philosopher was expected to spend most of her
17-
> time thinking; but when she felt hungry, she went to the dining room, sat down
18-
> in her own chair, picked up her own fork on her left, and plunged it into the
19-
> spaghetti. But such is the tangled nature of spaghetti that a second fork is
20-
> required to carry it to the mouth. The philosopher therefore had also to pick
21-
> up the fork on her right. When she was finished she would put down both her
22-
> forks, get up from her chair, and continue thinking. Of course, a fork can be
23-
> used by only one philosopher at a time. If the other philosopher wants it, she
24-
> just has to wait until the fork is available again.
16+
> was constantly replenished. A philosopher was expected to spend most of
17+
> [their] time thinking; but when [they] felt hungry, [they] went to the dining
18+
> room, sat down in [thier] own chair, picked up [their] own fork on her left,
19+
> and plunged it into the spaghetti. But such is the tangled nature of
20+
> spaghetti that a second fork is required to carry it to the mouth. The
21+
> philosopher therefore had also to pick up the fork on [their] right. When
22+
> [they] was finished [they] would put down both [their] forks, get up from her
23+
> chair, and continue thinking. Of course, a fork can be used by only one
24+
> philosopher at a time. If the other philosopher wants it, [they] just [have]
25+
> to wait until the fork is available again.
2526
2627
This classic problem shows off a few different elements of concurrency. The
2728
reason is that it's actually slightly tricky to implement: a simple
@@ -60,10 +61,10 @@ impl Philosopher {
6061
}
6162

6263
fn main() {
63-
let p1 = Philosopher::new("Baruch Spinoza");
64+
let p1 = Philosopher::new("Judith Butler");
6465
let p2 = Philosopher::new("Gilles Deleuze");
6566
let p3 = Philosopher::new("Karl Marx");
66-
let p4 = Philosopher::new("Friedrich Nietzsche");
67+
let p4 = Philosopher::new("Emma Goldman");
6768
let p5 = Philosopher::new("Michel Foucault");
6869
}
6970
```
@@ -159,10 +160,10 @@ look at `main()` again:
159160
# }
160161
#
161162
fn main() {
162-
let p1 = Philosopher::new("Baruch Spinoza");
163+
let p1 = Philosopher::new("Judith Butler");
163164
let p2 = Philosopher::new("Gilles Deleuze");
164165
let p3 = Philosopher::new("Karl Marx");
165-
let p4 = Philosopher::new("Friedrich Nietzsche");
166+
let p4 = Philosopher::new("Emma Goldman");
166167
let p5 = Philosopher::new("Michel Foucault");
167168
}
168169
```
@@ -176,7 +177,7 @@ that `new()` function, it would look like this:
176177
# name: String,
177178
# }
178179
fn main() {
179-
let p1 = Philosopher { name: "Baruch Spinoza".to_string() };
180+
let p1 = Philosopher { name: "Judith Butler".to_string() };
180181
let p2 = Philosopher { name: "Gilles Deleuze".to_string() };
181182
let p3 = Philosopher { name: "Karl Marx".to_string() };
182183
let p4 = Philosopher { name: "Friedrich Nietzche".to_string() };
@@ -211,10 +212,10 @@ impl Philosopher {
211212

212213
fn main() {
213214
let philosophers = vec![
214-
Philosopher::new("Baruch Spinoza"),
215+
Philosopher::new("Judith Butler"),
215216
Philosopher::new("Gilles Deleuze"),
216217
Philosopher::new("Karl Marx"),
217-
Philosopher::new("Friedrich Nietzsche"),
218+
Philosopher::new("Emma Goldman"),
218219
Philosopher::new("Michel Foucault"),
219220
];
220221

@@ -247,10 +248,10 @@ mention they’re done eating. Running this program should give you the followin
247248
output:
248249

249250
```text
250-
Baruch Spinoza is done eating.
251+
Judith Butler is done eating.
251252
Gilles Deleuze is done eating.
252253
Karl Marx is done eating.
253-
Friedrich Nietzsche is done eating.
254+
Emma Goldman is done eating.
254255
Michel Foucault is done eating.
255256
```
256257

@@ -285,10 +286,10 @@ impl Philosopher {
285286

286287
fn main() {
287288
let philosophers = vec![
288-
Philosopher::new("Baruch Spinoza"),
289+
Philosopher::new("Judith Butler"),
289290
Philosopher::new("Gilles Deleuze"),
290291
Philosopher::new("Karl Marx"),
291-
Philosopher::new("Friedrich Nietzsche"),
292+
Philosopher::new("Emma Goldman"),
292293
Philosopher::new("Michel Foucault"),
293294
];
294295

@@ -323,14 +324,14 @@ simulate the time it takes a philosopher to eat.
323324
If you run this program, you should see each philosopher eat in turn:
324325

325326
```text
326-
Baruch Spinoza is eating.
327-
Baruch Spinoza is done eating.
327+
Judith Butler is eating.
328+
Judith Butler is done eating.
328329
Gilles Deleuze is eating.
329330
Gilles Deleuze is done eating.
330331
Karl Marx is eating.
331332
Karl Marx is done eating.
332-
Friedrich Nietzsche is eating.
333-
Friedrich Nietzsche is done eating.
333+
Emma Goldman is eating.
334+
Emma Goldman is done eating.
334335
Michel Foucault is eating.
335336
Michel Foucault is done eating.
336337
```
@@ -366,10 +367,10 @@ impl Philosopher {
366367

367368
fn main() {
368369
let philosophers = vec![
369-
Philosopher::new("Baruch Spinoza"),
370+
Philosopher::new("Judith Butler"),
370371
Philosopher::new("Gilles Deleuze"),
371372
Philosopher::new("Karl Marx"),
372-
Philosopher::new("Friedrich Nietzsche"),
373+
Philosopher::new("Emma Goldman"),
373374
Philosopher::new("Michel Foucault"),
374375
];
375376

@@ -458,11 +459,11 @@ We have multi-threading!
458459
```text
459460
Gilles Deleuze is eating.
460461
Gilles Deleuze is done eating.
461-
Friedrich Nietzsche is eating.
462-
Friedrich Nietzsche is done eating.
462+
Emma Goldman is eating.
463+
Emma Goldman is done eating.
463464
Michel Foucault is eating.
464-
Baruch Spinoza is eating.
465-
Baruch Spinoza is done eating.
465+
Judith Butler is eating.
466+
Judith Butler is done eating.
466467
Karl Marx is eating.
467468
Karl Marx is done eating.
468469
Michel Foucault is done eating.
@@ -532,10 +533,10 @@ fn main() {
532533
]});
533534

534535
let philosophers = vec![
535-
Philosopher::new("Baruch Spinoza", 0, 1),
536+
Philosopher::new("Judith Butler", 0, 1),
536537
Philosopher::new("Gilles Deleuze", 1, 2),
537538
Philosopher::new("Karl Marx", 2, 3),
538-
Philosopher::new("Friedrich Nietzsche", 3, 4),
539+
Philosopher::new("Emma Goldman", 3, 4),
539540
Philosopher::new("Michel Foucault", 0, 4),
540541
];
541542

@@ -643,10 +644,10 @@ count will go up, and when each thread ends, it will go back down.
643644

644645
```rust,ignore
645646
let philosophers = vec![
646-
Philosopher::new("Baruch Spinoza", 0, 1),
647+
Philosopher::new("Judith Butler", 0, 1),
647648
Philosopher::new("Gilles Deleuze", 1, 2),
648649
Philosopher::new("Karl Marx", 2, 3),
649-
Philosopher::new("Friedrich Nietzsche", 3, 4),
650+
Philosopher::new("Emma Goldman", 3, 4),
650651
Philosopher::new("Michel Foucault", 0, 4),
651652
];
652653
```
@@ -679,12 +680,12 @@ and so you’ll get some output like this:
679680

680681
```text
681682
Gilles Deleuze is eating.
682-
Friedrich Nietzsche is eating.
683-
Friedrich Nietzsche is done eating.
683+
Emma Goldman is eating.
684+
Emma Goldman is done eating.
684685
Gilles Deleuze is done eating.
685-
Baruch Spinoza is eating.
686+
Judith Butler is eating.
686687
Karl Marx is eating.
687-
Baruch Spinoza is done eating.
688+
Judith Butler is done eating.
688689
Michel Foucault is eating.
689690
Karl Marx is done eating.
690691
Michel Foucault is done eating.

src/liballoc/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
//! // At the end of the method, gadget_owner, gadget1 and gadget2 get
145145
//! // destroyed. There are now no strong (`Rc<T>`) references to the gadgets.
146146
//! // Once they get destroyed, the Gadgets get destroyed. This zeroes the
147-
//! // reference count on Gadget Man, so he gets destroyed as well.
147+
//! // reference count on Gadget Man, they get destroyed as well.
148148
//! }
149149
//! ```
150150

0 commit comments

Comments
 (0)