internal void Exit() { try { HeldLocks.Remove(this); } finally { Monitor.Exit(this); } }
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); } }