Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API Proposal]: Parallel.ForEachTaskAsync #100482

Closed
alrz opened this issue Apr 1, 2024 · 1 comment
Closed

[API Proposal]: Parallel.ForEachTaskAsync #100482

alrz opened this issue Apr 1, 2024 · 1 comment
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Threading.Tasks

Comments

@alrz
Copy link
Member

alrz commented Apr 1, 2024

Background and motivation

This would be a variation of Task.WhenEach (#61959) but since it uses a callback, the result can be processed in parallel.

API Proposal

namespace System.Threading.Tasks;

public class Parallel
{
    public Task ForEachTaskAsync(Task<T>[] tasks, Func<Task<T>, Task> body);
}

API Usage

Task<Result>[] tasks = ...;
await Parallel.ForEachTaskAync(tasks, process);

Alternative Designs

No response

Risks

No response

@alrz alrz added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Apr 1, 2024
@alrz alrz changed the title [API Proposal]: Parallel.ForEachTaskAync(Task<T>[], Func<Task<T>, Task>) [API Proposal]: Parallel.ForEachTaskAsync(Task<T>[], Func<Task<T>, Task>) Apr 1, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-threading-tasks
See info in area-owners.md if you want to be subscribed.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 1, 2024
@alrz alrz changed the title [API Proposal]: Parallel.ForEachTaskAsync(Task<T>[], Func<Task<T>, Task>) [API Proposal]: `Parallel.ForEachTaskAsync Apr 1, 2024
@alrz alrz changed the title [API Proposal]: `Parallel.ForEachTaskAsync [API Proposal]: Parallel.ForEachTaskAsync Apr 1, 2024
@alrz alrz closed this as completed Apr 1, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Apr 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Threading.Tasks
Projects
None yet
Development

No branches or pull requests

1 participant