A breach of immutability due to memory implicit conversions to immutable without synchronisation, maybe??

Nicholas Wilson iamthewilsonator at hotmail.com
Wed Nov 14 01:00:26 UTC 2018


On Tuesday, 13 November 2018 at 17:18:17 UTC, John Colvin wrote:
> On Tuesday, 13 November 2018 at 11:39:48 UTC, Kagamin wrote:
>> On Monday, 12 November 2018 at 15:00:33 UTC, John Colvin wrote:
>>> The correct statement would be more like "reading immutable 
>>> data doesn't require synchronisation if the method of 
>>> obtaining the reference to the immutable data has at least 
>>> acquire-release semantics". Which is considerably less snappy 
>>> and confidence inspiring haha!
>>
>> Well, without acquire-release you can't meaningfully share 
>> data - it simply doesn't reach another thread. Does it even 
>> count as sharing? With immutable data you need to deliver data 
>> only once, after that you can read it without synchronization.
>
> What - precisely - do you mean by "without acquire-release you 
> can't meaningfully share data - it simply doesn't reach another 
> thread"?

I *think* it isn't guaranteed to leave cache otherwise.




More information about the Digitalmars-d mailing list