Example #1
0
            public void Dispose()
            {
                _item.DecrementCount();
                if (_item.WaiterCount == 0)
                {
                    // Remove from dict
                    _locks.TryRemove(_item.Key, out _);
                }

                _item.Semaphore.Release();
                _item = null;
            }
Example #2
0
 public Releaser(KeyedLock item)
 {
     _item = item;
 }