public void ConstructorWithLengthSetExpectedLength()
        {
            const int length = 2;
            _volatile = new Volatile.ReferenceArray<ClassStub>(length);

            Assert.AreEqual(length, _volatile.Length);
        }
Example #2
0
        public void ConstructorWithLengthSetExpectedLength()
        {
            const int length = 2;

            _volatile = new Volatile.ReferenceArray <ClassStub>(length);

            Assert.AreEqual(length, _volatile.Length);
        }
Example #3
0
        private Volatile.Long _lastRead = new Volatile.Long(0); // the newest slot that it is safe to overwrite

        public CoalescingRingBuffer(int capacity)
        {
            _capacity = NextPowerOfTwo(capacity);
            _mask     = _capacity - 1;

            _keys = new K[_capacity];

            _values = new Volatile.ReferenceArray <V>(_capacity);
        }
Example #4
0
 public void SetUp()
 {
     _volatile = new Volatile.ReferenceArray <ClassStub>(InitialValues);
 }
 public void SetUp()
 {
     _volatile = new Volatile.ReferenceArray<ClassStub>(InitialValues);
 }