Пример #1
0
        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));
            }
        }
Пример #2
0
        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);
        }
Пример #3
0
 public void TakeUpgradeableLock(ILockStateInternal state) =>
 [email protected]();
Пример #4
0
 public void TakeExclusiveLock(ILockStateInternal state) =>
 [email protected]();
Пример #5
0
 public void TakeSharedLock(ILockStateInternal state) =>
 [email protected]();
Пример #6
0
 public void TakeExclusiveLock(ILockStateInternal state)
 {
     enterLock(
         state,
         [email protected]);
 }
Пример #7
0
 public void TakeSharedLock(ILockStateInternal state)
 {
     enterLock(
         state,
         [email protected]);
 }
Пример #8
0
 public void TakeUpgradeableLock(ILockStateInternal state)
 {
     enterLock(
         state,
         [email protected]);
 }