rust/library
Urgau 66dc09f3da
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`
2024-10-16 12:03:42 +02:00
..
alloc Auto merge of #131460 - jwong101:default-placement-new, r=ibraheemdev 2024-10-16 06:36:43 +00:00
backtrace@230570f2da Try latest backtrace 2024-08-29 12:13:19 -07:00
core Rollup merge of #131712 - tgross35:const-lazy_cell_into_inner, r=joboet 2024-10-16 12:03:41 +02:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind library: Compute RUST_EXCEPTION_CLASS from native-endian bytes 2024-09-26 11:34:17 -07:00
portable-simd stabilize const_intrinsic_copy 2024-09-23 22:12:54 +02:00
proc_macro update Literal's intro 2024-10-02 01:27:11 +08:00
profiler_builtins Don't skip nonexistent source files 2024-08-27 17:30:42 +10:00
rtstartup Let InstCombine remove Clone shims inside Clone shims 2024-07-25 15:14:42 -04:00
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #131746 - slanterns:once_box_order, r=joboet 2024-10-16 12:03:42 +02:00
stdarch@c881fe3231 stdarch: Bump stdarch submodule 2024-10-10 10:16:16 +00:00
sysroot Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35 2024-07-29 07:41:33 +00:00
test Change a few &Option<T> into Option<&T> 2024-10-08 23:26:29 -04:00
unwind Use throw intrinsic from stdarch in wasm libunwind 2024-10-08 15:50:37 -05:00
windows_targets Win: Add dbghelp to the list of import libraries 2024-09-06 21:21:49 +00:00
Cargo.lock Update compiler-builtins to 0.1.133 2024-10-05 21:34:51 -05:00
Cargo.toml Auto merge of #129063 - the8472:cold-opt-size, r=Amanieu 2024-09-02 00:58:50 +00:00