On Wednesday, 2 April 2025 at 08:33:05 UTC, Inkrementator wrote:
On Tuesday, 1 April 2025 at 23:01:23 UTC, Daniel Donnelly, Jr. wrote:
Say I have a static context stack in my class Context, will each new thread receive their own copy of the static member or do I have to account for multiple threads and do it myself?

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.

Thats a good thing.  The default is great for my app.

Reply via email to