public AsyncKeyReaderWriterLock(int maxPoolSize = 64) { this.pool = new ConcurrentBag <AsyncReaderWriterLock>(); this.activeLocks = new RefCountedConcurrentDictionary <TKey, AsyncReaderWriterLock>(this.CreateLeasedLock, this.ReturnLeasedLock); this.maxPoolSize = maxPoolSize; }
internal RefCountedDictionaryEnumerable(RefCountedConcurrentDictionary <TKey, TValue> dictionary) => this.dictionary = dictionary;