about summary refs log tree commit diff
path: root/library/std/src/sync
diff options
context:
space:
mode:
authorAlisa Sireneva <me@purplesyringa.moe>2025-07-25 22:14:02 +0300
committerAlisa Sireneva <me@purplesyringa.moe>2025-07-25 22:14:02 +0300
commitc1d06cccaed537c799838dc5338dda28bbace52b (patch)
treeada0e9d351745f39c7f2af5af07f9a995289002b /library/std/src/sync
parent5b8c61494f85a58759dad04194c8353de07d75e1 (diff)
downloadrust-c1d06cccaed537c799838dc5338dda28bbace52b.tar.gz
rust-c1d06cccaed537c799838dc5338dda28bbace52b.zip
Add a note on foreign exceptions
Diffstat (limited to 'library/std/src/sync')
-rw-r--r--library/std/src/sync/poison/mutex.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/sync/poison/mutex.rs b/library/std/src/sync/poison/mutex.rs
index 317e5fc3bfb..363220baf7b 100644
--- a/library/std/src/sync/poison/mutex.rs
+++ b/library/std/src/sync/poison/mutex.rs
@@ -46,6 +46,9 @@ use crate::sys::sync as sys;
 ///   storing the guard to a [`Cell`] within [`Drop::drop`] and accessing it
 ///   outside, or vice versa, can affect poisoning status in an unexpected way.
 ///
+/// - Foreign exceptions do not currently trigger poisoning even in absence of
+///   other panics.
+///
 /// While this rarely happens in realistic code, `unsafe` code cannot rely on
 /// poisoning for soundness, since the behavior of poisoning can depend on
 /// outside context. Here's an example of **incorrect** use of poisoning: