internal void Init(int capacity) { int c = QueueHelper.RoundPowerOf2(capacity); array = new Slot[c + 2]; mask = c - 1; }
internal void InitVolatile(int capacity) { int c = QueueHelper.RoundPowerOf2(capacity); mask = c - 1; Volatile.Write(ref array, new Slot[c + 2]); }
internal void Init(int capacity) { int c = QueueHelper.RoundPowerOf2(Math.Max(2, capacity)); producerArray = consumerArray = new Slot[c + 2]; mask = c - 1; }
internal void InitVolatile(int capacity) { int c = QueueHelper.RoundPowerOf2(Math.Max(2, capacity)); Slot[] a = new Slot[c + 2]; mask = c - 1; producerArray = a; Volatile.Write(ref consumerArray, a); }
internal bool IsEmpty() { return(QueueHelper.IsEmpty(ref producerIndex, ref consumerIndex)); }
internal int Size() { return(QueueHelper.Size(ref producerIndex, ref consumerIndex)); }
public void Clear() { QueueHelper.Clear(this); }