From aa03c0c7740a66dd9697471866bd843a2688bcfd Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Tue, 19 Mar 2024 16:32:50 -0500 Subject: [PATCH] Marked code as obsolete as there is a better way to run things in parallel. --- src/Foundatio/Utility/Run.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Foundatio/Utility/Run.cs b/src/Foundatio/Utility/Run.cs index 9283bbfd..f3b7ce1f 100644 --- a/src/Foundatio/Utility/Run.cs +++ b/src/Foundatio/Utility/Run.cs @@ -25,6 +25,7 @@ public static Task DelayedAsync(TimeSpan delay, Func action, CancellationT }, cancellationToken); } + [Obsolete("Use Parallel.ForEachAsync")] public static Task InParallelAsync(int iterations, Func work) { return Task.WhenAll(Enumerable.Range(1, iterations).Select(i => Task.Run(() => work(i))));