about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/example/std_example.rs
diff options
context:
space:
mode:
authorAngelicosPhosphoros <angelicos.phosphoros@protonmail.com>2023-12-19 22:08:48 +0100
committerAngelicosPhosphoros <angelicos.phosphoros@protonmail.com>2023-12-19 22:19:03 +0100
commit1c5b2ce67cb8d698350b93143b8de342805145cc (patch)
treeb19988834522851959674ff2d86c16e8d2164a38 /compiler/rustc_codegen_gcc/example/std_example.rs
parent3a539c08891a422d34beb32d2556a08ea0357b7d (diff)
downloadrust-1c5b2ce67cb8d698350b93143b8de342805145cc.tar.gz
rust-1c5b2ce67cb8d698350b93143b8de342805145cc.zip
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.
Diffstat (limited to 'compiler/rustc_codegen_gcc/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions