System.Threading.ClientSpinLock.Exit C# (CSharp) Method

Exit() private method

private Exit ( bool useMemoryBarrier ) : void
useMemoryBarrier bool
return void
        public void Exit(bool useMemoryBarrier)
        {
            RuntimeHelpers.PrepareConstrainedRegions ();
            try {}
            finally {
                if (isThreadOwnerTrackingEnabled && !IsHeldByCurrentThread)
                    throw new SynchronizationLockException ("Current thread is not the owner of this lock");

                threadWhoTookLock = int.MinValue;
                do {
                    if (useMemoryBarrier)
                        ClientInterlocked.Increment (ref ticket.Value);
                    else
            ticket.Value++;
            } while (stallTickets != null && ((ClientConcurrentOrderedList<int>)stallTickets).TryRemove(ticket.Value));
            }
        }

Same methods

ClientSpinLock::Exit ( ) : void