Re:No sane compiler would optimize atomics (2015)
by Dylan16807 on Sunday July 11, 2021 @10:49PM
(#27806417)
A yield might be way too slow.
And sure, there should be a way to signal intentions. By my point is that there is a reasonable way to describe what certain people would expect by default.
Re:No sane compiler would optimize atomics (2015)
by spacechild1 on Monday July 12, 2021 @05:30AM
(#27808550)
“volatile std::atomic“ also works and is more clear, IMO.
If you need it - write it down! I can't guess your intentions as a compiler author!