sync::Mutex: Add note about the absence of poisoning (#1933)

This commit is contained in:
Danilo Bargen
2019-12-09 09:13:24 -08:00
committed by Carl Lerche
parent 80abff0e57
commit 2450b5bfc9
+5
View File
@@ -26,6 +26,11 @@
//! }
//! ```
//!
//! Note that in contrast to `std::sync::Mutex`, this implementation does not
//! poison the mutex when a thread holding the `MutexGuard` panics. In such a
//! case, the mutex will be unlocked. If the panic is caught, this might leave
//! the data protected by the mutes in an inconsistent state.
//!
//! [`Mutex`]: struct.Mutex.html
//! [`MutexGuard`]: struct.MutexGuard.html