about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-18 15:18:50 +0000
committerbors <bors@rust-lang.org>2022-06-18 15:18:50 +0000
commitec21d7ea3ca8e96863f175fbd4a6bfee79529d6c (patch)
tree5415778c4f2c10e5a646d04b71baf2560f1551db /compiler/rustc_codegen_llvm/src
parent2cec6874c086a8fa107115dcca73d93228a3bef6 (diff)
parent34895ded2c76cc87dc6ff33adaa541c239d416bf (diff)
downloadrust-ec21d7ea3ca8e96863f175fbd4a6bfee79529d6c.tar.gz
rust-ec21d7ea3ca8e96863f175fbd4a6bfee79529d6c.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions