Releases: Cysharp/ValueTaskSupplement
Releases · Cysharp/ValueTaskSupplement
Ver 1.1.0
Ver 1.0.0
ValueTaskEx.Lazy returns AsyncLazy<T>
instead of returns ValueTask<T>
directly because follows IValueTaskSource
guidance.
// AsyncLazy<T> is similar to Lazy<T>, it can store in field
// it await directly or can convert to ValueTask easily to use WhenAll.
public static AsyncLazy<T> Lazy<T>(Func<ValueTask<T>> factory)
public class AsyncLazy<T>
{
public ValueTask<T> AsValueTask();
public ValueTaskAwaiter<T> GetAwaiter();
public static implicit operator ValueTask<T>(AsyncLazy<T> source);
}