.NET Tricks, Tips, and Snippets
System.Threading.Interlocked.CompareExchange(ref x, y, null);
if (x == null) { lock (lockObject) { if (x == null) { x = y; } } }
Post a Comment
No comments:
Post a Comment