Synchronisation help

Anonymouse zorael at gmail.com
Tue Jan 2 11:39:12 UTC 2024


On Tuesday, 2 January 2024 at 11:05:33 UTC, user1234 wrote:
> Do not use `shared` AA. Use `__gshared` + sync primitives. 
> `shared` AA will lead to all sort of bugs:
>
> - https://issues.dlang.org/show_bug.cgi?id=20484#c1
> - https://issues.dlang.org/show_bug.cgi?id=17088
> - https://issues.dlang.org/show_bug.cgi?id=16597
> - etc.

Hmm, I see.

Is `shared` safe to use with AAs *provided* I use sync 
primitives, or should I favour `__gshared` over `shared`? I was 
under the impression `__gshared` was only really meant for 
interfacing with C.


More information about the Digitalmars-d-learn mailing list