rust/library/std/src
bors ec21d7ea3c Auto merge of #97924 - cuviper:unguarded-poison, r=Mark-Simulacrum
Avoid `thread::panicking()` in non-poisoning methods of `Mutex` and `RwLock`

`Mutex::lock()` and `RwLock::write()` are poison-guarded against panics,
in that they set the poison flag if a panic occurs while they're locked.
But if we're already in a panic (`thread::panicking()`), they leave the
poison flag alone.

That check is a bit of a waste for methods that never set the poison
flag though, namely `get_mut()`, `into_inner()`, and `RwLock::read()`.
These use-cases are now split to avoid that unnecessary call.
2022-06-18 15:18:50 +00:00
..
backtrace
collections Add examples using add_modify to HashMap 2022-06-15 01:41:56 -05:00
env
error
f32
f64
ffi Rollup merge of #95392 - Xuanwo:stablize_try_reserve_2, r=dtolnay 2022-06-17 12:21:46 +02:00
fs
io Rollup merge of #97922 - paolobarbolini:no-vecdeque-extra-reserve, r=the8472 2022-06-10 17:22:31 +09:00
lazy
net
num
os Auto merge of #97178 - sunfishcode:ownedfd-and-dup, r=joshtriplett 2022-06-15 21:08:08 +00:00
panic
path
prelude
process
sync Avoid thread::panicking() in non-poisoning methods of Mutex and RwLock 2022-06-09 11:51:39 -07:00
sys Rollup merge of #97844 - ChrisDenton:dont-panic, r=JohnTitor 2022-06-17 12:21:48 +02:00
sys_common Lower listen backlog to fix accept crashes 2022-06-13 20:44:56 -07:00
thread Test NLL fix of bad lifetime inference for reference captured in closure. 2022-06-15 11:54:59 +02:00
time
alloc.rs
ascii.rs
backtrace.rs
env.rs
error.rs
f32.rs
f64.rs
fs.rs
keyword_docs.rs Rollup merge of #98169 - pierwill:dyn-disp, r=JohnTitor 2022-06-17 07:16:58 +09:00
lazy.rs
lib.rs Auto merge of #96837 - tmiasko:stdio-fcntl, r=joshtriplett 2022-06-10 11:50:39 +00:00
macros.rs
num.rs
panic.rs
panicking.rs
path.rs std: Stabilize feature try_reserve_2 2022-06-16 09:30:34 +08:00
primitive_docs.rs rustdoc: change "variadic tuple" notation to look less like real syntax 2022-06-14 12:21:38 -07:00
process.rs Impl Termination for Infallible and then make the Result impls of Termination into a blanket 2022-06-17 13:54:17 -04:00
rt.rs
time.rs