I want to add a Phobos module with template mixins for common idioms.
Idan Arye
GenericNPC at gmail.com
Sun May 19 23:53:30 PDT 2013
On Monday, 20 May 2013 at 05:39:42 UTC, Diggory wrote:
> In your logic you're assuming that the order of operations is
> maintained - without the correct memory barriers or
> synchronisation both the compiler and CPU are free to
> completely reorder any operations you do. That's why it's
> always a bug to access mutable shared data without
> synchronisation - any read not using some form of
> synchronisation could give you back any value that the memory
> is ever set to during the course of the program.
It can't be THAT chaotic. Neither the compiler nor the CPU will
perform a check on a value and then go back in time to fetch an
old version of that value and return it. This kind of behavior
would break non-threaded code.
More information about the Digitalmars-d
mailing list