any tool to at least partially convert C++ to D (htod for source

Walter Bright newshound1 at digitalmars.com
Wed Mar 10 13:20:12 PST 2010


Max Samukha wrote:
> Lazy initialization requires some kind of synchronization when a is 
> shared. Static initialization does not have that drawback.

That's correct (otherwise you have the double checked locking bug).

Wrapping the function body in a synchronized statement will do the trick.

(Yes, it's slower.)



More information about the Digitalmars-d mailing list