On 02/09/2014 01:20 PM, luka8088 wrote:
class FunctionPointerSingleton {private static __gshared typeof(this) instance_; // tls @property static typeof(this) function () get;
You don't even need to make this TLS, right?
static this () {
get = {
synchronized {
if (instance_ is null)
instance_ = new typeof(this)();
get = { return instance_; };
return instance_;
}
};
}
}
