How to await the results of an IAsyncEnumerable<Task<T>>, with a specific level of concurrency
问题 I have an asynchronous stream of tasks, that is generated by applying an async lambda to a stream of items: IAsyncEnumerable<int> streamOfItems = AsyncEnumerable.Range(1, 10); IAsyncEnumerable<Task<string>> streamOfTasks = streamOfItems.Select(async x => { await Task.Delay(100); return x.ToString(); }) The methods AsyncEnumerable.Range and Select above are provided from the System.Linq.Async package. The result I want is a stream of results, expressed as an IAsyncEnumerable<string> . The