If you run 1000 Tasks in parallel, you might overwhelm your DB or external API. Use SemaphoreSlim to limit concurrency.
private static SemaphoreSlim _gate = new(5); // Only 5 at a time
await _gate.WaitAsync();
try {
await CallExternalApi();
} finally {
_gate.Release();
}
