On Monday, 6 May 2013 at 02:35:33 UTC, dsimcha wrote:
On the advice of Walter and Andrei, I've written a blog article
about the low-lock Singleton pattern in D. This is a
previously obscure pattern that uses thread-local storage to
make Singletons both thread-safe and efficient and was
independently invented by at least me and Alexander Terekhov,
an IBM researcher. However, D's first-class treatment of
thread-local storage means the time has come to move it out of
obscurity and possibly make it the standard way to do
Singletons.
Article:
http://davesdprogramming.wordpress.com/2013/05/06/low-lock-singletons/
Reddit:
http://www.reddit.com/r/programming/comments/1droaa/lowlock_singletons_in_d_the_singleton_pattern/
Thanks!
I want to make a module with template mixins that implement some
common idioms - singleton being one of
them(http://forum.dlang.org/thread/[email protected]).
I'm going to use your version for implementing the singleton
idiom.