public IBufferPoolScope <T> CreateScope() { if (!_scopes.TryTake(out var scope)) { scope = new BufferPoolScope(this, _arrayPool); } return(scope); }
private void Return(BufferPoolScope scope) { _scopes.Add(scope); }
public IBufferPoolScope <T> CreateScope() { if (!_scopes.TryTake(out var scope)) { scope = new BufferPoolScope(this, _arrayPool); } return(scope); }
private void Return(BufferPoolScope scope) { _scopes.Add(scope); }