DotNext.Threading by .NET Foundation and Contributors

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

 TaskCompletionPipe

public static class TaskCompletionPipe
Provides various extension methods for TaskCompletionPipe<T> class.
public struct Consumer<T> : IAsyncEnumerable<T>

Represents asynchronous consumer for the pipe.

public static Consumer<T> Consume<T>(this TaskCompletionPipe<Task<T>> pipe)

Gets asynchronous consumer.

public static Consumer<T> Consume<T>(this ReadOnlySpan<Task<T>> tasks)

Gets a collection over tasks to be available as they complete.

public static IAsyncEnumerable<T> WhenEach<T>(ReadOnlySpan<T> tasks) where T : Task

Creates a collection over tasks to be available as they complete.