示例#1
0
        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);
        }
示例#2
0
 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);
 }