public async Task <T> GetValueAsync(Func <Task <T> > valueInitializer) { return(await _semaphore.DoubleCheckedLockAsync <T>( () => _value, val => val is null, async() => _value = await valueInitializer())); }
public async Task <T> GetValueAsync(Func <Task <T> > valueInitializer) { return(await _semaphore.DoubleCheckedLockAsync <T>( () => _value, val => val is null, async() => _value = await valueInitializer())); }