Lucene.Net.Support.AtomicInteger.CompareAndSet C# (CSharp) Method

CompareAndSet() public method

public CompareAndSet ( int expect, int update ) : bool
expect int
update int
return bool
        public bool CompareAndSet(int expect, int update)
        {
            int rc = Interlocked.CompareExchange(ref value, update, expect);
            return rc == expect;
        }
    }