how to stop a variable from being optimized out

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Feb 23 22:48:26 PST 2015


On Tue, 24 Feb 2015 06:29:33 +0000, Rory wrote:

> Is there a way I can stop "current" from being optimized out without
> using "volatile"?

but why do you need this? just use `atomicLoad` to get shared variable 
value, it will do the right caching.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150224/7ea988ee/attachment.sig>


More information about the Digitalmars-d-learn mailing list