mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-17 00:00:11 +02:00
sync::Mutex: Add note about the absence of poisoning (#1933)
This commit is contained in:
committed by
Carl Lerche
parent
80abff0e57
commit
2450b5bfc9
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user