public void StripedLongAdder() { _stripedLongAdder.Increment(); _stripedLongAdder.Decrement(); _stripedLongAdder.GetAndReset(); _stripedLongAdder.NonVolatileGetValue(); _stripedLongAdder.Increment(); _stripedLongAdder.Decrement(); }
public void Can_get_without_volatile_read_fence_and_ordering() { Parallel.For( 1, 1000, l => { _num.Add(l); var val = _num.NonVolatileGetValue(); val.Should().BeGreaterOrEqualTo(l); }); }