提交 9b110299 编写于 作者: J Jason Malinowski

Remove comment that no longer applies

AsyncLazy no longer calls computation functions under the lock.
上级 de93c18d
......@@ -80,13 +80,6 @@ public AsyncLazy(T value)
_cachedResult = Task.FromResult(value);
}
/// <summary>
/// Important: callers of this constructor should ensure that the compute function returns
/// a task in a non-blocking fashion. i.e. the function should *not* synchronously compute
/// a value and then return it using Task.FromResult. Instead, it should return an actual
/// task that operates asynchronously. If this function synchronously computes a value
/// then that will cause locks to be held in this type for excessive periods of time.
/// </summary>
public AsyncLazy(Func<CancellationToken, Task<T>> asynchronousComputeFunction, bool cacheResult)
: this(asynchronousComputeFunction, synchronousComputeFunction: null, cacheResult: cacheResult)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册