using System.Diagnostics;
using System.Threading.Tasks;
using System.Collections.Generic;
public static async Task Main()
var stopwatch = Stopwatch.StartNew();
await foreach (var pair in First().Zip(Second()))
Console.WriteLine($"Duration: {stopwatch.ElapsedMilliseconds:#,0} msec");
static async IAsyncEnumerable<int> First()
for (int i = 1; i <= 5; i++) { await Task.Delay(100); yield return i; }
static async IAsyncEnumerable<int> Second()
for (int i = 1; i <= 5; i++) { await Task.Delay(100); yield return i; }