Class MyConcurrentBucketPool<T>
Simple thread-safe pool.
Can store external objects by calling return.
Creates new instances when empty.
Inheritance
System.Object
MyConcurrentBucketPool<T>
Assembly: VRage.Library.dll
Syntax
public class MyConcurrentBucketPool<T> : MyConcurrentBucketPool where T : class
Type Parameters
Constructors
MyConcurrentBucketPool(String, IMyElementAllocator<T>, Int32, Boolean)
Declaration
public MyConcurrentBucketPool(string debugName, IMyElementAllocator<T> allocator, int maxPooledInstances = 2147483647, bool autoClearPool = false)
Parameters
Type |
Name |
Description |
System.String |
debugName |
|
IMyElementAllocator<T> |
allocator |
|
System.Int32 |
maxPooledInstances |
|
System.Boolean |
autoClearPool |
|
Methods
Clear()
Declaration
DisposeInternal()
Declaration
protected override void DisposeInternal()
Overrides
Get(Int32)
Declaration
public T Get(int bucketId)
Parameters
Type |
Name |
Description |
System.Int32 |
bucketId |
|
Returns
GetReport()
Declaration
public MyBufferStatistics GetReport()
Returns
Return(T)
Declaration
public void Return(T instance)
Parameters
Type |
Name |
Description |
T |
instance |
|