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