DotNext by Roman Sakno

<PackageReference Include="DotNext" Version="0.9.0" />

 Synchronization

public static class Synchronization
Represents task synchronization and combination methods.
public static R GetResult<R>(this Task<R> task, TimeSpan timeout)

Gets task result synchronously.

public static R GetResult<R>(this Task<R> task, CancellationToken token)

Gets task result synchronously.

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

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

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

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

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

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

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

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