mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-12-25 21:58:26 +01:00
fix a small typo in 11_locks.md (#219)
This commit is contained in:
parent
eb2d858807
commit
4b02e92691
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ drop(guard)
|
||||||
## Locking granularity
|
## Locking granularity
|
||||||
|
|
||||||
What should our `Mutex` wrap?\
|
What should our `Mutex` wrap?\
|
||||||
The simplest option would be the wrap the entire `TicketStore` in a single `Mutex`.\
|
The simplest option would be to wrap the entire `TicketStore` in a single `Mutex`.\
|
||||||
This would work, but it would severely limit the system's performance: you wouldn't be able to read tickets in parallel,
|
This would work, but it would severely limit the system's performance: you wouldn't be able to read tickets in parallel,
|
||||||
because every read would have to wait for the lock to be released.\
|
because every read would have to wait for the lock to be released.\
|
||||||
This is known as **coarse-grained locking**.
|
This is known as **coarse-grained locking**.
|
||||||
|
|
Loading…
Reference in a new issue