Пример #1
0
 internal void Invalidate()
 {
     // Keep next or prev unless this is the last or first node, respectively.
     // That way a read loop may continue to loop to the next (or prev) item
     // even if this one got deleted.
     this.list = null;
 }
Пример #2
0
 internal ActiveListNode(ActiveList <T> list, T value)
 {
     if (list == null)
     {
         throw new InvalidOperationException("list");
     }
     this.list = list;
     item      = value;
 }
Пример #3
0
        private void Register(LatencyMetric metric, out LatencyMetric previous)
        {
            ActiveList <LatencyMetric> list;

            lock ( listMapLocker) {
                if (!listMap.TryGetValue(metric.Symbol, out list))
                {
                    list = new ActiveList <LatencyMetric>();
                    listMap[metric.Symbol] = list;
                }
                previous = list.Count > 0 ? list.Last.Value : null;
                list.AddLast(metric);
            }
        }