jmdavis/phobos — comment on commit 56c8acdeb45d0f10fb065b0db131b1eb9aa6ab81
File: std/datetime.d line 28545
By jmdavis:

It requires an extra variable and therefore more memory (albeit obviously not much). So, if the same effect can be gotten with double-checked locking, it seems to me to be preferrable to go that route. Given that `shared` doesn't work properly for that at the moment however, it might be better to use the second variable rather than mess with the atomics. In the long run though, I think that double-checked locking is the better choice.