Skip to content

Commit f74fbd4

Browse files
authoredMay 28, 2024
* Add missing of * change tense of spawn * ignored to ignoring * add need
1 parent bd9faa0 commit f74fbd4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed
 

‎book/src/07_threads/00_intro.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ We'll have the opportunity to touch most of Rust's core concurrency features, in
1212
- Shared state, using `Arc`, `Mutex` and `RwLock`
1313
- `Send` and `Sync`, the traits that encode Rust's concurrency guarantees
1414

15-
We'll also discuss various design patterns for multithreaded systems and some their trade-offs.
15+
We'll also discuss various design patterns for multithreaded systems and some of their trade-offs.

‎book/src/07_threads/11_locks.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct TicketStore {
7474
```
7575

7676
This approach is more efficient, but it has a downside: `TicketStore` has to become **aware** of the multithreaded
77-
nature of the system; up until now, `TicketStore` has been blissfully ignored the existence of threads.\
77+
nature of the system; up until now, `TicketStore` has been blissfully ignoring the existence of threads.\
7878
Let's go for it anyway.
7979

8080
## Who holds the lock?

‎book/src/07_threads/13_without_channels.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ If we remove the channels, we need to introduce (another) lock to synchronize ac
4848

4949
If we use a `Mutex`, then it makes no sense to use an additional `RwLock` for each ticket: the `Mutex` will
5050
already serialize access to the entire store, so we wouldn't be able to read tickets in parallel anyway.\
51-
If we use a `RwLock`, instead, we can read tickets in parallel. We just to pause all reads while inserting
51+
If we use a `RwLock`, instead, we can read tickets in parallel. We just need to pause all reads while inserting
5252
or removing a ticket.
5353

5454
Let's go down this path and see where it leads us.

‎exercises/07_threads/01_threads/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// You _could_ pass this test by just returning `v.iter().sum()`,
99
// but that would defeat the purpose of the exercise.
1010
//
11-
// Hint: you won't be able to get the spawn threads to _borrow_
11+
// Hint: you won't be able to get the spawned threads to _borrow_
1212
// slices of the vector directly. You'll need to allocate new
1313
// vectors for each half of the original vector. We'll see why
1414
// this is necessary in the next exercise.

0 commit comments

Comments
 (0)
Please sign in to comment.