mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-11-21 13:25:53 +02:00
Simplify language on mutex page (#2440)
The “iff” phrasing has confused people in the past.
This commit is contained in:
parent
fb17791c26
commit
0f00434a0f
@ -39,8 +39,8 @@ implementation.
|
||||
protected data.
|
||||
- You can get an `&mut T` from an `&Mutex<T>` by taking the lock. The
|
||||
`MutexGuard` ensures that the `&mut T` doesn't outlive the lock being held.
|
||||
- `Mutex<T>` implements both `Send` and `Sync` iff (if and only if) `T`
|
||||
implements `Send`.
|
||||
- `Mutex<T>` implements both `Send` and `Sync` if and only if `T` implements
|
||||
`Send`.
|
||||
- A read-write lock counterpart: `RwLock`.
|
||||
- Why does `lock()` return a `Result`?
|
||||
- If the thread that held the `Mutex` panicked, the `Mutex` becomes "poisoned"
|
||||
|
Loading…
Reference in New Issue
Block a user