Issue with atomics…

Russel Winder via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Jan 28 04:12:32 PST 2015


I have a piece of code:

	synchronized(sumMutex) { sum += localSum; }

Ugly, I know. LDC tells me (deprecation warning) to replace it with:

	atomicOp!"+="(sum, localSum);

Sadly this code fails to work. It is an LDC thing as the code works fine
with DMD. Is this a bug I should be reporting, or is it something
already known?

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-ldc/attachments/20150128/e61316e3/attachment.sig>


More information about the digitalmars-d-ldc mailing list