Exemple #1
0
 public void Dispose()
 {
     if (this.mutex != null)
     {
         this.mutex.Exit();
         this.mutex = null;
     }
 }
Exemple #2
0
 public static UseLockScope UseLock(this CriticalSection mutex) =>
 new UseLockScope(mutex);
Exemple #3
0
 internal UseLockScope(CriticalSection mutex)
 {
     Validate.IsNotNull <CriticalSection>(mutex, "mutex");
     this.mutex = mutex;
     this.mutex.Enter();
 }