public void ReleaseReaderLock() { if (UseNativeSRWLock) { NativeMethods.ReleaseSRWLockShared(ref LockSRW); } else { pLock.ReleaseShared(); } }
public void ReleaseReaderLock() { if (UseNativeSRWLock) { NativeMethods.ReleaseSRWLockShared(ref LockSRW); } else { #if UseFastResourceLock pLock.ReleaseShared(); #else Interlocked.Decrement(ref readCount); Thread.EndCriticalRegion(); #endif } }