Fully transitive const is not necessary
Steven Schveighoffer
schveiguy at yahoo.com
Wed Apr 2 13:21:53 PDT 2008
"Janice Caron" wrote
> On 02/04/2008, Steven Schveighoffer 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.
OK, sure, so we lock the AA with a mutex lock :)
Again, has no bearing on the proof.
-Steve
More information about the Digitalmars-d
mailing list