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