Exemplo n.º 1
0
 internal void Exit()
 {
     try
     {
         HeldLocks.Remove(this);
     }
     finally
     {
         Monitor.Exit(this);
     }
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     // Note: the following operations are logically atomic, but since the
     // list we are using is thread local there is no need to take a lock.
     try
     {
         HeldLocks.Remove(this.m_lock);
     }
     finally
     {
         Monitor.Exit(this.m_lock);
     }
 }