Esempio n. 1
0
        /// <summary>
        /// Releases the lock.
        /// </summary>
        public void Dispose()
        {
            var yieldLock = _lock;

            if (yieldLock != null)
            {
                _lock = null;
                yieldLock.ExitReadLock();
            }
        }
		/// <summary>
		/// Releases the lock.
		/// </summary>
		public void Dispose()
		{
			var yieldLock = _lock;

			if (yieldLock != null)
			{
				_lock = null;
				yieldLock.ExitWriteLock();
			}
		}
		/// <summary>
		/// Releases the lock.
		/// </summary>
		public void Dispose()
		{
			var yieldLock = _lock;

			if (yieldLock != null)
			{
				_lock = null;

			    yieldLock.ExitUpgradeableLock(_upgraded);
			}
		}
        /// <summary>
        /// Releases the lock.
        /// </summary>
        public void Dispose()
        {
            var yieldLock = _lock;

            if (yieldLock != null)
            {
                _lock = null;

                yieldLock.ExitUpgradeableLock(_upgraded);
            }
        }
Esempio n. 5
0
 internal OptimisticReadLock(OptimisticReaderWriterLock yieldLock)
 {
     _lock = yieldLock;
 }
		internal OptimisticWriteLock(OptimisticReaderWriterLock yieldLock)
		{
			_lock = yieldLock;
		}
		internal OptimisticUpgradeableLock(OptimisticReaderWriterLock yieldLock)
		{
			_lock = yieldLock;
			_upgraded = false;
		}
 internal OptimisticUpgradeableLock(OptimisticReaderWriterLock yieldLock)
 {
     _lock     = yieldLock;
     _upgraded = false;
 }