private bool TryPop(out PoolSlot <T> slot) { if (_storage.TryPop(out slot)) { Interlocked.Decrement(ref _currentCount); slot.SetStatus(false); return(true); } slot = null; return(false); }
private void Push(PoolSlot <T> slot) { slot.SetStatus(true); _storage.Push(slot); Interlocked.Increment(ref _currentCount); }