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