You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/MemoryPools/Collections/Specialized/PoolingQueueVal.cs

17 lines
622 B

namespace MemoryPools.Collections.Specialized
{
/// <summary>
/// Poolinq queue stores items in buckets of 256 size, who linked with linked list.
/// Nodes of this list and storage (array[256])
/// ** NOT THREAD SAFE **
/// Enqueue, dequeue: O(1).
/// </summary>
/// <typeparam name="T">Items should be classes because underlying collection stores object type</typeparam>
public sealed class PoolingQueueVal<T> : PoolingQueue<T> where T : struct
{
protected override IPoolingNode<T> CreateNodeHolder()
{
return Pool<PoolingNode<T>>.Get().Init(PoolsDefaults.DefaultPoolBucketSize);
}
}
}

Powered by TurnKey Linux.