[Issue 3243] Mixin 'static this()' bring on a compiler message ': __gate is thread local'

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 26 15:41:35 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=3243


Bloutiouf <bloutiouf at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bloutiouf at gmail.com


--- Comment #3 from Bloutiouf <bloutiouf at gmail.com> 2013-11-26 15:41:29 PST ---
I have this "bug" with D2.064. However, I'm not sure it is a bug, and that it
should be fixed the way Jeremie suggested, because static constructors
initialize thread local data. If you make the gate gshared, then you will only
initialize for one thread.

By the way, the line Jeremie gave for patching is now:

v->storage_class = isSharedStaticCtorDeclaration() ? STCstatic : STCtls;

There is also the same pattern below for the destructor (not in Jeremie's
patch).

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list