is increment on shared ulong atomic operation?

rsw0x via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Feb 7 12:53:35 PST 2016


On Sunday, 7 February 2016 at 20:25:44 UTC, Minas Mina wrote:
> On Sunday, 7 February 2016 at 19:43:23 UTC, rsw0x wrote:
>> On Sunday, 7 February 2016 at 19:39:27 UTC, rsw0x wrote:
>>> On Sunday, 7 February 2016 at 19:27:19 UTC, Charles Hixson 
>>> wrote:
>>>> [...]
>>>
>>> https://dlang.org/phobos/core_atomic.html#.atomicOp
>>
>> Just noticed that there's no example.
>> It's used like
>>
>> shared(ulong) a;
>> atomicOp!"+="(a, 1);
>
> Wow, that syntax sucks a lot.

how so?
It's meant to be very explicit


More information about the Digitalmars-d-learn mailing list