diff options
| author | Urgau <3616612+Urgau@users.noreply.github.com> | 2024-10-16 12:03:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-16 12:03:42 +0200 |
| commit | 66dc09f3dacce171389b0861a320aaeb6f95f659 (patch) | |
| tree | 3726fe0ef8d8b83c79d9526923e8c10d426fdde8 /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | f7af3aa7dcef25ed66cc3b290df6e52dc4a3595d (diff) | |
| parent | 937d13b8efc43f3f2e93f81360565d82f243ce15 (diff) | |
| download | rust-66dc09f3dacce171389b0861a320aaeb6f95f659.tar.gz rust-66dc09f3dacce171389b0861a320aaeb6f95f659.zip | |
Rollup merge of #131746 - slanterns:once_box_order, r=joboet
Relax a memory order in `once_box` per https://github.com/rust-lang/rust/pull/131094#discussion_r1788536445. In the successful path we don't need `Acquire` since we don't care if the store in `f()` happened in other threads has become visible to the current thread. We'll use our own results instead and just using `Release` to ensure other threads can see our store to `Box` when they fail the `compare_exchange` will suffice. Also took https://marabos.nl/atomics/memory-ordering.html#example-lazy-initialization-with-indirection as a reference. `@rustbot` label: +T-libs r? `@ibraheemdev`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
