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; }
internal ActiveListNode(ActiveList <T> list, T value) { if (list == null) { throw new InvalidOperationException("list"); } this.list = list; item = value; }
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); } }