Show / Hide Table of Contents

Class MyConcurrentBucketPool<T>

Simple thread-safe pool. Can store external objects by calling return. Creates new instances when empty.

Inheritance
System.Object
MyConcurrentBucketPool
MyConcurrentBucketPool<T>
MyConcurrentBucketPool<TElement, TAllocator>
MyConcurrentBufferPool<TElement>
Inherited Members
MyConcurrentBucketPool.EnablePooling
MyConcurrentBucketPool.OnExit()
Namespace: VRage.Collections
Assembly: VRage.Library.dll
Syntax
public class MyConcurrentBucketPool<T> : MyConcurrentBucketPool where T : class
Type Parameters
Name Description
T

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
public void Clear()

DisposeInternal()

Declaration
protected override void DisposeInternal()
Overrides
MyConcurrentBucketPool.DisposeInternal()

Get(Int32)

Declaration
public T Get(int bucketId)
Parameters
Type Name Description
System.Int32 bucketId
Returns
Type Description
T

GetReport()

Declaration
public MyBufferStatistics GetReport()
Returns
Type Description
MyBufferStatistics

Return(T)

Declaration
public void Return(T instance)
Parameters
Type Name Description
T instance
☀
☾
In This Article
  • Constructors
    • MyConcurrentBucketPool(String, IMyElementAllocator<T>, Int32, Boolean)
  • Methods
    • Clear()
    • DisposeInternal()
    • Get(Int32)
    • GetReport()
    • Return(T)
Back to top
Generated by DocFX
☀
☾