static MySingleton get() { if (instance_ is null) { synchronized { if (instance_ is null) { atomicStore(instance_, new MySingleton); } } } return instance_; }
This should work fine and faster.
Kagamin via Digitalmars-d-learn Wed, 16 Nov 2016 02:56:07 -0800
static MySingleton get() { if (instance_ is null) { synchronized { if (instance_ is null) { atomicStore(instance_, new MySingleton); } } } return instance_; }
This should work fine and faster.