mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-11-16 19:50:44 +01:00
Reword MutexGuard
explanation.
This commit is contained in:
parent
d698ccdc1e
commit
7d1d90fb37
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ For example: `MutexGuard` is not `Send`, but it is `Sync`.
|
|||
|
||||
It isn't `Send` because the lock must be released on the same thread that acquired it, therefore we don't
|
||||
want `MutexGuard` to be dropped on a different thread.
|
||||
But it is `Sync`, because that has no impact on where the lock is released.
|
||||
But it is `Sync`, because giving a `&MutexGuard` to another thread has no impact on where the lock is released.
|
||||
|
||||
## `Send` doesn't imply `Sync`
|
||||
|
||||
|
|
Loading…
Reference in a new issue