timcassell / ProtoPromise

Robust and efficient library for management of asynchronous operations in C#/.Net.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `Promise.Each` to process operations as they complete

timcassell opened this issue · comments

Similar to new Task.WhenEach.

TPL uses WhenAll WhenAny WhenEach APIs, while ProtoPromise uses All Race, so it follows to use Each for this rather than WhenEach.

Also, instead of returning IAsyncEnumerable<Task<T>>, we can return AsyncEnumerable<Promise<T>.ResultContainer>.