diff options
| author | bors <bors@rust-lang.org> | 2022-06-18 15:18:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-18 15:18:50 +0000 |
| commit | ec21d7ea3ca8e96863f175fbd4a6bfee79529d6c (patch) | |
| tree | 5415778c4f2c10e5a646d04b71baf2560f1551db /compiler/rustc_codegen_llvm/src | |
| parent | 2cec6874c086a8fa107115dcca73d93228a3bef6 (diff) | |
| parent | 34895ded2c76cc87dc6ff33adaa541c239d416bf (diff) | |
| download | rust-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
