public void CheckInBuffers() { lock (_lockObject) { foreach (var buffer in _bufferList) { _bufferManager.CheckIn(buffer); } _bufferList.Clear(); } }
private static void ReleaseBuffer(IBufferManager bufferManager, IEnumerable <ArraySegment <byte> > buffers) { bufferManager.CheckIn(buffers); }
private static async Task CheckInAfterWait(ArraySegment <byte> buffer, IBufferManager bufferManager) { await Task.Delay(3000); bufferManager.CheckIn(buffer); }