On Monday, 6 May 2013 at 21:13:24 UTC, Andrej Mitrovic wrote:
On 5/6/13, dsimcha <[email protected]> wrote:
On the advice of Walter and Andrei, I've written a blog article
about the low-lock Singleton pattern in D.

Personally this covers it for me:

final abstract class singleton
{
static:
    void foo() { }
    int f;
}

void main()
{
    singleton.foo();
    singleton.f = 1;
}

Never needed anything more complex than that. :p

Although that's only a single-per-thread-ton :P

Reply via email to