fix a small typo in 11_locks.md (#219)
Some checks failed
CI / build (push) Has been cancelled
CI / is_fresh (push) Has been cancelled
CI / formatter (push) Has been cancelled
CI / gravity (push) Has been cancelled

This commit is contained in:
dawe 2024-11-18 10:58:59 +01:00 committed by GitHub
parent eb2d858807
commit 4b02e92691
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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**.