AA vs __gshared

IchorDev zxinsworld at gmail.com
Fri Jul 28 06:59:29 UTC 2023


On Friday, 28 July 2023 at 04:13:13 UTC, Kagamin wrote:
> The difference between them is purely formal if you're not on 
> an old gdc, where shared was synchronized like C# volatile.

I'm not sure that's correct. Also I always use the latest 
compiler versions where possible.

> start many threads and access the locked AA concurrently.

It's only being accessed from one thread, so such a test wouldn't 
be an accurate reproduction of the issue I'm having. Also I'm 
only using 2 threads total.


More information about the Digitalmars-d-learn mailing list