Class MyConcurrentPool<T>
  
  Simple thread-safe pool.
Can store external objects by calling return.
Creates new instances when empty.
 
  
  
    Inheritance
    System.Object
    MyConcurrentPool<T>
   
  
  Assembly: VRage.Library.dll
  Syntax
  
    public class MyConcurrentPool<T> : Object, IConcurrentPool where T : new()
   
  Type Parameters
  
  Constructors
  
  
  
  
  MyConcurrentPool(Int32, Action<T>, Int32, Func<T>, Action<T>)
  
  
  Declaration
  
    public MyConcurrentPool(int defaultCapacity = 0, Action<T> clear = null, int expectedAllocations = 10000, Func<T> activator = null, Action<T> deactivator = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Int32 | 
        defaultCapacity | 
         | 
      
      
        | System.Action<T> | 
        clear | 
         | 
      
      
        | System.Int32 | 
        expectedAllocations | 
         | 
      
      
        | System.Func<T> | 
        activator | 
         | 
      
      
        | System.Action<T> | 
        deactivator | 
         | 
      
    
  
  Properties
  
  
  
  
  Allocated
  
  
  Declaration
  
    public int Allocated { get; set; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  
  
  
  Count
  
  
  Declaration
  
    public int Count { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Int32 | 
         | 
      
    
  
  Methods
  
  
  
  
  Clean()
  
  
  Declaration
  
  
  
  
  Get()
  
  
  Declaration
  
  Returns
  
  
  
  
  Return(T)
  
  
  Declaration
  
    public void Return(T instance)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | T | 
        instance | 
         |