thread local singleton vs. static variables

2013-07-11 Thread estew
Hi, I've been looking at std.idoms: http://someboddy.github.io/phobos/ddocs/for-idioms/idioms.html I am wondering why I would need ThreadLocalSingleton when D has thread local static variables. For example: class A { // My thread local globals. private this() {} static int x; stat

Re: thread local singleton vs. static variables

2013-07-11 Thread estew
Could it be something to do with purity, perhaps?