# gather_with_concurrency

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/runnables/utils/gather_with_concurrency)

Gather coroutines with a limit on the number of concurrent coroutines.

## Signature

```python
gather_with_concurrency(
    n: int | None,
    *coros: Coroutine = (),
) -> list
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `n` | `int \| None` | Yes | The number of coroutines to run concurrently. |
| `*coros` | `Coroutine` | No | The coroutines to run. (default: `()`) |

## Returns

`list`

The results of the coroutines.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/02991cb4cf2063d51a07268edafb05fe53de1826/libs/core/langchain_core/runnables/utils.py#L63)