예제 #1
0
 protected FunctionBase()
 {
     Locks = ComputedRegistry.Instance.GetLocksFor(this);
 }
예제 #2
0
 public AsyncSetLock(IAsyncLockSet <TKey> lockSet, TKey key)
 {
     LockSet = lockSet;
     Key     = key;
 }
예제 #3
0
 protected ComputingCacheBase(IAsyncCache <TKey, TValue> cache, IAsyncLockSet <TKey>?lockSet = null)
 {
     Cache = cache;
     Locks = lockSet ?? new AsyncLockSet <TKey>(ReentryMode.CheckedFail);
 }
예제 #4
0
 protected FunctionBase(IComputedRegistry computedRegistry)
 {
     ComputedRegistry   = computedRegistry;
     Locks              = computedRegistry.GetLocksFor(this);
     InvalidatedHandler = c => Unregister((IComputed <TIn, TOut>)c !);
 }