Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ExitReadLock()

void System.Threading.ReaderWriterLockSlim.ExitReadLock ( )
inline

Definition at line 841 of file ReaderWriterLockSlim.cs.

842 {
844 ReaderWriterCount threadRWCount = GetThreadRWCount(dontAllocate: true);
845 if (threadRWCount == null || threadRWCount.readercount < 1)
846 {
847 _spinLock.Exit();
848 throw new SynchronizationLockException(SR.SynchronizationLockException_MisMatchedRead);
849 }
850 if (_fIsReentrant)
851 {
852 if (threadRWCount.readercount > 1)
853 {
854 threadRWCount.readercount--;
855 _spinLock.Exit();
856 return;
857 }
858 if (Environment.CurrentManagedThreadId == _upgradeLockOwnerId)
859 {
861 }
862 }
863 _owners--;
864 threadRWCount.readercount--;
866 }
ReaderWriterCount GetThreadRWCount(bool dontAllocate)

References System.Threading.ReaderWriterLockSlim._fIsReentrant, System.Threading.ReaderWriterLockSlim._fUpgradeThreadHoldingRead, System.Threading.ReaderWriterLockSlim._owners, System.Threading.ReaderWriterLockSlim._spinLock, System.Threading.ReaderWriterLockSlim._upgradeLockOwnerId, System.Environment.CurrentManagedThreadId, System.Threading.ReaderWriterLockSlim.SpinLock.Enter(), System.Threading.ReaderWriterLockSlim.SpinLock.Exit(), System.Threading.ReaderWriterLockSlim.ExitAndWakeUpAppropriateWaiters(), System.Threading.ReaderWriterLockSlim.GetThreadRWCount(), System.Threading.ReaderWriterCount.readercount, and System.SR.SynchronizationLockException_MisMatchedRead.

Referenced by System.Security.AccessControl.ObjectSecurity< T >.ReadUnlock().