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

Walter Bright newshound2 at digitalmars.com
Fri Oct 4 03:43:30 UTC 2019


On 10/1/2019 3:07 PM, ag0aep6g wrote:
> On 01.10.19 22:34, Walter Bright wrote:
>> Actually, shared operations would no longer be generated from the syntax. 
>> They'd all be done with library functions
> 
> To clarify, we're going to get this(?):
> 
>      shared int x;
>      void main()
>      {
>          x = 42; /* error */
>      }

Yes.


> You should change the first sentence of the DIP then. It says: "Reads and writes 
> to data typed as shared are made atomic where the target CPU supports atomic 
> operations".
> 
>  From that sentence I would very much expect the code be accepted and generate 
> an atomic write.

I agree it's confusing.


More information about the Digitalmars-d mailing list