BEPUutilities.SpinLock.TryEnter C# (CSharp) Method

TryEnter() public method

Attempts to enters the critical section. A thread cannot attempt to enter the spinlock if it already owns the spinlock.
public TryEnter ( ) : bool
return bool
        public bool TryEnter()
        {
            return Interlocked.CompareExchange(ref owner, 0, -1) == -1;
        }