Fixing core.atomic
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon May 31 20:33:28 UTC 2021
On Monday, 31 May 2021 at 16:34:35 UTC, Guillaume Piolat wrote:
> On Monday, 31 May 2021 at 09:26:36 UTC, rm wrote:
>>
>> I don't consider this a problem. In this case you have a load
>> and a store. This is a non-atomic RMW. On the other hand, you
>> do get sequential consistency synchronization from this
>> process.
>
> I prefer atomicLoad and atomicStore then, because it's explicit
> and it's useless to hide the fact it's atomic behind nice
> syntax.
Yes, how often do people use this anyway? I try to avoid
concurrency issues and have found that I tend to end up using
compare-exchange when I have to.
More information about the Digitalmars-d
mailing list