Exemplo n.º 1
0
 /// <summary>
 /// Releases the lock. Subsequent calls to this method do nothing.
 /// </summary>
 public void Dispose()
 {
     if (parent == null)
     {
         return;
     }
     parent.Unlock();
     parent = null;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructs a new lock token for the specified lock.
 /// </summary>
 /// <param name="parent">The internal monitor used for locking.</param>
 internal LockToken(SyncLock parent)
 {
     this.parent = parent;
 }