mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-05 16:10:31 +02:00
Explain iff in mutex.md (#810)
--------- Co-authored-by: Martin Geisler <martin@geisler.net>
This commit is contained in:
parent
19780b832c
commit
cf0ce5c0b2
@ -32,7 +32,7 @@ implementation.
|
||||
* It is not possible to forget to acquire the mutex before accessing the 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 `T` implements `Send`.
|
||||
* `Mutex<T>` implements both `Send` and `Sync` iff (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" to signal that
|
||||
|
Loading…
Reference in New Issue
Block a user