On Wednesday, 2 April 2025 at 08:38:32 UTC, Daniel Donnelly, Jr. wrote:
On Wednesday, 2 April 2025 at 08:33:05 UTC, Inkrementator wrote:
All global variables in D, including static class members, are thread local by default. You have to explicitly add the `__gshared` attribute to the static variable to make it truly global.

Addendum: When you need non-thread-local global variable, look into `shared` instead of `__gshared` to see if it meets your needs.

Reply via email to