Static constructors in circularly imported modules - again
spambox at d-coding.com
Thu May 27 09:29:25 PDT 2010
On 27.05.2010 18:38, Michel Fortin wrote:
> But it isn't thread-safe, and I
> expect it would be a pain to make lazy initialization thread-safe,
> although I haven't tried yet.
That has been the very point of this thread (no pun). In my other post I
supplied a hack that uses two variables, shared and TLS, to reduce the
cost of accessing the global. Not ideal at all but at least it requires
synchronization only during the first access.
More information about the Digitalmars-d