public DeadlockException(
     int threadA,
     object intendedObjectA,
     ILockState intendedStateA,
     ILockState holdingStateA,
     int threadB,
     object intendedObjectB,
     ILockState intendedStateB,
     ILockState holdingStateB) : base("A deadlock has occured.")
 {
     this.threadA         = threadA;
     this.intendedObjectA = intendedObjectA;
     this.intendedStateA  = intendedStateA;
     this.holdingStateA   = holdingStateA;
     this.threadB         = threadB;
     this.intendedObjectB = intendedObjectB;
     this.intendedStateB  = intendedStateB;
     this.holdingStateB   = holdingStateB;
 }
Example #2
0
 public Item(ILockState state)
 {
     this.LockState       = state;
     this.AcqusitionState = AcqusitionState.Intent;
 }
Example #3
0
 public Lock()
 {
     CurrentLockState = new LockedLockState(this);
 }
Example #4
0
 public void ChangeLockState(ILockState lockState)
 {
     CurrentLockState = lockState;
 }
Example #5
0
 public void SetLockStateMachine(ILockState newStateMachine)
 {
     lockStateMachine = newStateMachine;
 }