Only const or immutable class thread local variables are allowed
Ali Çehreli
acehreli at yahoo.com
Sun Dec 8 16:24:43 PST 2013
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
More information about the Digitalmars-d-learn
mailing list