On 12/08/2013 02:40 PM, qznc wrote:
I understand you are talking about the "Singleton" design pattern. You might want to look how std.parallelism does it with the default global thread pool.https://github.com/D-Programming-Language/phobos/blob/master/std/parallelism.d#L3261
David Simcha presented it as a D-specific pattern and explained how D avoids at least one of the bugs of double-checked locking:
http://www.youtube.com/watch?feature=player_detailpage&v=yMNMV9JlkcQ#t=1676 Ali
