示例#1
0
        public void ReacquireLocks(LockState lockState)
        {
            int writeLockCounter = lockState.writeLockCount;
            int readLockCounter  = lockState.readLockCount;

            while (writeLockCounter-- > 0)
            {
                WriteLock.Lock();
            }
            while (readLockCounter-- > 0)
            {
                ReadLock.Lock();
            }
        }
示例#2
0
 public ReadWriteLock()
 {
     ReadLock  = new ReadLock(this);
     WriteLock = new WriteLock(this);
 }