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