Fully transitive const is not necessary

Janice Caron caron800 at googlemail.com
Wed Apr 2 12:59:21 PDT 2008


On 02/04/2008, Steven Schveighoffer <schveiguy at yahoo.com> wrote:
>  > (2) are we really sure that modifying an AA is an atomic operation? I'm
>  > not.
>
> I am really sure that modifying an AA is not an atomic operation, but that
>  has no bearing on the proof.  Setting x in the mutable version is also not
>  atomic.

Two instances of the same muty class would each have their own
independent mutable variables. That means that modifications to those
variables don't have to be atomic.

However, two instances of the same globby class would share the /same/
AA, so accesses to that AA would need to be atomic, otherwise, the AA
could itself end up with a corrupt memory layout.



More information about the Digitalmars-d mailing list