Alternative to Double-Checked Locking: Lazy <T>

added by flyingkick
5/29/2012 8:33:06 AM

11 Kicks, 492 Views

Don't write double-checked locking patterns yourself. In C#, there is a better, safer alternative.


1 comments

dpeterson
5/29/2012 8:33:57 AM
It's also nearly always better to avoid not-invented-here syndrome by using the tools made available as part of the framework. Besides, it's sort of fun to call a type Lazy. ;-)