diff options
author | Danilo Bargen <mail@dbrgn.ch> | 2019-12-09 18:13:24 +0100 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2019-12-09 09:13:24 -0800 |
commit | 2450b5bfc9ee788975d84d4feb87f8820b63bd3f (patch) | |
tree | 7180472bc08d9eb48cb58dd719159923750a4ada /tokio | |
parent | 80abff0e570e365cca41a1fd7aba5a15a47654d8 (diff) |
sync::Mutex: Add note about the absence of poisoning (#1933)
Diffstat (limited to 'tokio')
-rw-r--r-- | tokio/src/sync/mutex.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tokio/src/sync/mutex.rs b/tokio/src/sync/mutex.rs index 474f5368..cf42c3e1 100644 --- a/tokio/src/sync/mutex.rs +++ b/tokio/src/sync/mutex.rs @@ -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 |