---
url: https://scruple.dev/rules/async/no-unbounded-concurrency.md
description: Disallow potentially unbounded promise fan-out.
---

# async/no-unbounded-concurrency

Disallow potentially unbounded promise fan-out.

## What it checks

Promise aggregation over boundary-sized collections should use batching or a concurrency limit; fixed tuples are safe.

## Rule metadata

* Package: `@scruple/async`
* Category: Concurrency
* Tags: promises, limits, fan-out
* Default threshold: `0.9`
* Minimum confidence: `0.7`

## Examples

### Reported

```ts
await Promise.all(req.body.urls.map(fetch));
```

### Accepted

```ts
await mapWithConcurrency(req.body.urls, 8, fetch);
```
