Пример #1
0
        private async Task ConsumerLoop()
        {
            while (_pipe.Available)
            {
                List <LoggingEvent> batch;
                while (_pipe.TryLockBatch(out batch))
                {
                    LoggingEvent[] localCopy = new LoggingEvent[batch.Count];
                    batch.CopyTo(localCopy);

                    m_appenderAttachedImpl.AppendLoopOnAppenders(localCopy);

                    _pipe.ReleaseBatch();
                }

                await Task.Delay(500);
            }

            // TODO: handle errors..
        }