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