[API Proposal]: Add Parallel.InvokeAsync #112900
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.Threading.Tasks
untriaged
New issue has not been triaged by the area owner
Background and motivation
Parallel.Invoke
currently provides for concurrently executing a set ofAction
s, but does not provide for executing a set of async actions (Func<CancellationToken, ValueTask>
). I have found a frequent need to concurrently execute a set of async actions, where if any action fails, all other actions are cancelled and the exception of the failing action is thrown. i.e., similar behavior is required that is provided byParallel.ForEachAsync
, but whereForEachAsync
executes a single function for a collection of inputs,Parallel.InvokeAsync
would execute a collection of async actions.API Proposal
API Usage
Alternative Designs
No response
Risks
No response
The text was updated successfully, but these errors were encountered: