Exemple #1
0
        public void updateRecency_onGetQuietly(ConcurrentLinkedDictionary <int, int> map)
        {
            PaddedAtomicLong drainCounter = map.readBufferDrainAtWriteCount[ConcurrentLinkedDictionary <int, int> .readBufferIndex()];

            var  first   = map.evictionDeque.Peek();
            long drained = drainCounter.GetValue();

            map.GetQuietly(first.Key);
            map.DrainBuffers();

            Assert.That(map.evictionDeque.Peek(), Is.SameAs(first));
            Assert.That(drainCounter.GetValue(), Is.EqualTo(drained));
        }