DotNext.Threading by Roman Sakno

<PackageReference Include="DotNext.Threading" Version="0.12.0" />

 ValueTaskSynchronization

public static class ValueTaskSynchronization
Provides a set of methods for synchronization and combination of multiple ValueTasks.
public static ValueTask WhenAll(ValueTask task1, ValueTask task2)

Creates a task that will complete when all of the passed tasks have completed.

public static ValueTask<ValueTuple<T1, T2>> WhenAll<T1, T2>(ValueTask<T1> task1, ValueTask<T2> task2)

Creates a task that will complete when all of the passed tasks have completed.

public static ValueTask WhenAll(ValueTask task1, ValueTask task2, ValueTask task3)

Creates a task that will complete when all of the passed tasks have completed.

public static ValueTask<ValueTuple<T1, T2, T3>> WhenAll<T1, T2, T3>(ValueTask<T1> task1, ValueTask<T2> task2, ValueTask<T3> task3)

Creates a task that will complete when all of the passed tasks have completed.

public static ValueTask WhenAll(ValueTask task1, ValueTask task2, ValueTask task3, ValueTask task4)

Creates a task that will complete when all of the passed tasks have completed.

public static ValueTask<ValueTuple<T1, T2, T3, T4>> WhenAll<T1, T2, T3, T4>(ValueTask<T1> task1, ValueTask<T2> task2, ValueTask<T3> task3, ValueTask<T4> task4)

Creates a task that will complete when all of the passed tasks have completed.

public static ValueTask WhenAll(ValueTask task1, ValueTask task2, ValueTask task3, ValueTask task4, ValueTask task5)

Creates a task that will complete when all of the passed tasks have completed.

public static ValueTask<ValueTuple<T1, T2, T3, T4, T5>> WhenAll<T1, T2, T3, T4, T5>(ValueTask<T1> task1, ValueTask<T2> task2, ValueTask<T3> task3, ValueTask<T4> task4, ValueTask<T5> task5)

Creates a task that will complete when all of the passed tasks have completed.

public static ValueTask<ValueTask> WhenAny(ValueTask task1, ValueTask task2)

Creates a task that will complete when any of the supplied tasks have completed.

public static ValueTask<ValueTask<R>> WhenAny<R>(ValueTask<R> task1, ValueTask<R> task2)

Creates a task that will complete when any of the supplied tasks have completed.

public static ValueTask<ValueTask> WhenAny(ValueTask task1, ValueTask task2, ValueTask task3)

Creates a task that will complete when any of the supplied tasks have completed.

public static ValueTask<ValueTask<R>> WhenAny<R>(ValueTask<R> task1, ValueTask<R> task2, ValueTask<R> task3)

Creates a task that will complete when any of the supplied tasks have completed.

public static ValueTask<ValueTask> WhenAny(ValueTask task1, ValueTask task2, ValueTask task3, ValueTask task4)

Creates a task that will complete when any of the supplied tasks have completed.

public static ValueTask<ValueTask<R>> WhenAny<R>(ValueTask<R> task1, ValueTask<R> task2, ValueTask<R> task3, ValueTask<R> task4)

Creates a task that will complete when any of the supplied tasks have completed.

public static ValueTask<ValueTask> WhenAny(ValueTask task1, ValueTask task2, ValueTask task3, ValueTask task4, ValueTask task5)

Creates a task that will complete when any of the supplied tasks have completed.

public static ValueTask<ValueTask<R>> WhenAny<R>(ValueTask<R> task1, ValueTask<R> task2, ValueTask<R> task3, ValueTask<R> task4, ValueTask<R> task5)

Creates a task that will complete when any of the supplied tasks have completed.