rust/library/core
Dylan DPC 5bd119da84
Rollup merge of #94384 - cuviper:atomic-slice, r=dtolnay
Add Atomic*::from_mut_slice

Tracking issue #76314 for `from_mut` has a question about the possibility of `from_mut_slice`, and I found a real case for it. A user in the forum had a parallelism problem that could be solved by open-indexing updates to a vector of atomics, but they didn't want to affect the other code using that vector. Using `from_mut_slice`, they could borrow that data as atomics just long enough for their parallel loop.

ref: https://users.rust-lang.org/t/sharing-vector-with-rayon-par-iter-correctly/72022
2022-03-01 03:41:51 +01:00
..
benches Stop manually SIMDing in swap_nonoverlapping 2022-02-21 00:54:02 -08:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #94384 - cuviper:atomic-slice, r=dtolnay 2022-03-01 03:41:51 +01:00
tests Rollup merge of #89793 - ibraheemdev:from_ptr_range, r=m-ou-se 2022-02-28 12:57:44 +01:00
Cargo.toml Build libcore as 2021 in a few more places 2022-02-06 15:41:01 -08:00