about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/std_example.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-19 08:15:03 +0100
committerGitHub <noreply@github.com>2024-01-19 08:15:03 +0100
commitf9076bbcf1f3ec97340ed52043b2839f3bdb66de (patch)
treef43674ef3f5451afd40a664c96703885ad0d3722 /compiler/rustc_codegen_gcc/example/std_example.rs
parent2e4c6fc9985c5675e8148886cf83d7d683ac80a4 (diff)
parent1c5b2ce67cb8d698350b93143b8de342805145cc (diff)
downloadrust-f9076bbcf1f3ec97340ed52043b2839f3bdb66de.tar.gz
rust-f9076bbcf1f3ec97340ed52043b2839f3bdb66de.zip
Rollup merge of #119138 - AngelicosPhosphoros:use_proper_atomics_in_spinlock_example, r=Nilstrieb
Docs: Use non-SeqCst in module example of atomics

I done this for this reasons:
1. The example now shows that there is more Orderings than just SeqCst.
2. People who would copy from example would now have more suitable orderings for the job.
3. SeqCst is both much harder to reason about and not needed in most situations.

IMHO, we should encourage people to think and use memory orderings that is suitable to task instead of blindly defaulting to SeqCst.

r? `@m-ou-se`
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions