public void Set()
 {
     lock (_mutex)
     {
         if (_queue.IsEmpty)
         {
             _set = true;
         }
         else
         {
             _queue.Dequeue(null);
         }
     }
 }
Exemple #2
0
 internal void ReleaseLock()
 {
     lock (_mutex)
     {
         if (_queue.IsEmpty)
         {
             _taken = false;
         }
         else
         {
             _queue.Dequeue(new Key(this));
         }
     }
 }