public RFC2988BasedRTOCalculator(TimeSpan defaultRTO, TimeSpan minRTO, int timerGranularity, bool ignoreEP) { if (ignoreEP) { _lock = null; _states = null; } else { _lock = new ReaderWriterLockWrapper (); _states = new Dictionary<IPAddress,State> (); } _timerGranularity = timerGranularity; _minRTO = (int)minRTO.TotalMilliseconds; _defaultRTO = defaultRTO; }
public WriteLockCookie(ReaderWriterLockWrapper owner) { _owner = owner; _owner._lock.EnterWriteLock (); }
public UpgradeableReadLockCookie(ReaderWriterLockWrapper owner) { _owner = owner; _owner._lock.EnterUpgradeableReadLock (); }