private void WriteBag(StatsBag bag) { int p = _period; Interlocked.Increment(ref _period); var lines = bag.GetDump(); StatsBag b; if (_bag.TryRemove(p, out b)) { b.Clear(); } WriteLines(lines); }
private void WriteBag(StatsBag bag) { int p = _period; Interlocked.Increment(ref _period); var lines = bag.GetDump(); StatsBag b; if (_bag.TryRemove(p, out b)) b.Clear(); WriteLines(lines); }