public RingBufferStreamReadBarrier(RingBufferStreamAdapter innerStream, int length) { _ringBuffer = innerStream._ringBuffer; if (!_ringBuffer.TryAddReadingGate((uint)length, out _gate)) { Console.WriteLine("Could not add reading gate?"); throw new InvalidOperationException("Could not add reading gate?"); } _length = length; }
public RingBufferStreamReadBarrier(RingBufferStreamAdapter innerStream, int length) { _ringBuffer = innerStream._ringBuffer; // _length = length; _gate = _ringBuffer.AddReadingGate((uint)length); }