DIP 1024--Shared Atomics--Community Review Round 1

Stefan Koch uplink.coder at googlemail.com
Thu Oct 3 12:14:30 UTC 2019

On Thursday, 3 October 2019 at 09:29:28 UTC, Kagamin wrote:
> On Wednesday, 2 October 2019 at 11:49:48 UTC, Atila Neves wrote:
>> @system code can always cast away shared.
> It's justified for @safe code, because safety is mandatory 
> there, but not for system code. Access to shared data is well 
> within semantics of system code. System code is even intended 
> to access shared data because safe code can't do it in general 
> case.

A coworker of mine (Don Clugston) came up with this analogy.
Multi-threading is a bit like radiating material, you put it in a 
safe-box, and put a warning sticker on it, such that only 
professionals may open it.
And even the professional would not want to be around the 
material for very long and certainly would want to be warned 
before he accesses the material.
Therefore the material should be in it's designated box sealed 
away fore the majority of the time.

More information about the Digitalmars-d mailing list