*
This commit is contained in:
1 parent
d4c9adc7ca
commit
20ed81ed9e
2 files changed
+18
-18
No files matched your search
@@ -49,7 +49,7 @@ public static class TaskUtils {
|
||||
return (await outputTask + await errorTask, program.ExitCode);
|
||||
}
|
||||
|
||||
public static void ForEach<T>(this IEnumerable<T> source, Action<T> body)
|
||||
public static void ForEach<T>(IEnumerable<T> source, Action<T> body)
|
||||
=> Parallel.ForEach(source, body);
|
||||
public static async Task ForEachAsync<T>(IEnumerable<T> source, int maxDegreeOfParallelism, Func<T, CancellationToken, Task> body, CancellationToken cancellationToken = default) {
|
||||
using var linkedCancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
|
||||
|
||||
Reference in new issue
Block a user