public void Close() { if (Interlocked.CompareExchange(ref _free, 1, 0) == 0) { Value = default(T); _context.Close(this); } }
public void Close() { if (Interlocked.CompareExchange(ref _free, 1, 0) != 0) { return; } Value = default; _context.Close(this); }