internal void Intent(object obj, ILockStateInternal state) { lock (this.objects) { if (this.objects.TryGetValue(obj, out var stack) == false) { stack = new Stack <Item>(); this.objects.Add(obj, stack); } stack.Push(new Item(state)); } }
private void enterLock(ILockStateInternal state, Func <int, bool> acquireFunc) { var track = this.getTrack(Thread.CurrentThread.ManagedThreadId); track.Intent(this.target, state); while (acquireFunc(this.lockFailureResolver.Timeout) == false) { this.lockFailureResolver.Resolve(threadsLocksTrack); } track.Acquire(this.target); }
public void TakeUpgradeableLock(ILockStateInternal state) => [email protected]();
public void TakeExclusiveLock(ILockStateInternal state) => [email protected]();
public void TakeSharedLock(ILockStateInternal state) => [email protected]();
public void TakeExclusiveLock(ILockStateInternal state) { enterLock( state, [email protected]); }
public void TakeSharedLock(ILockStateInternal state) { enterLock( state, [email protected]); }
public void TakeUpgradeableLock(ILockStateInternal state) { enterLock( state, [email protected]); }