ec21d7ea3c
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. |
||
---|---|---|
.. | ||
backtrace | ||
collections | ||
env | ||
error | ||
f32 | ||
f64 | ||
ffi | ||
fs | ||
io | ||
lazy | ||
net | ||
num | ||
os | ||
panic | ||
path | ||
prelude | ||
process | ||
sync | ||
sys | ||
sys_common | ||
thread | ||
time | ||
alloc.rs | ||
ascii.rs | ||
backtrace.rs | ||
env.rs | ||
error.rs | ||
f32.rs | ||
f64.rs | ||
fs.rs | ||
keyword_docs.rs | ||
lazy.rs | ||
lib.rs | ||
macros.rs | ||
num.rs | ||
panic.rs | ||
panicking.rs | ||
path.rs | ||
primitive_docs.rs | ||
process.rs | ||
rt.rs | ||
time.rs |