Ejemplo n.º 1
0
 public LockContext(object lockTarget, string decription)
 {
     _lockDescription = decription;
     _lockTarget      = lockTarget;
     LockSupervisor.AcquireLock(this);
     Monitor.Enter(_lockTarget);
     LockSupervisor.AcquiredLock(this);
 }
Ejemplo n.º 2
0
 public void Dispose()
 {
     LockSupervisor.ReleaseLock(this);
     Monitor.Exit(_lockTarget);
 }