Skip to content

Commit

Permalink
Marked code as obsolete as there is a better way to run things in par…
Browse files Browse the repository at this point in the history
…allel.
  • Loading branch information
niemyjski committed Mar 19, 2024
1 parent ed54b82 commit aa03c0c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Foundatio/Utility/Run.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static Task DelayedAsync(TimeSpan delay, Func<Task> action, CancellationT
}, cancellationToken);
}

[Obsolete("Use Parallel.ForEachAsync")]
public static Task InParallelAsync(int iterations, Func<int, Task> work)
{
return Task.WhenAll(Enumerable.Range(1, iterations).Select(i => Task.Run(() => work(i))));
Expand Down

0 comments on commit aa03c0c

Please sign in to comment.