# `Slither.Dispatch.Runner`
[🔗](https://github.com/nshkrdotcom/slither/blob/v0.1.0/lib/slither/dispatch/runner.ex#L1)

Internal engine that executes batches with bounded concurrency.

Uses `Task.async_stream` with `max_concurrency` to enforce the
`max_in_flight` limit, providing real backpressure — upstream
enumeration only advances when a worker slot is available.

# `on_error`

```elixir
@type on_error() ::
  :skip
  | :halt
  | {:retry, keyword()}
  | {:route, (Slither.Item.t(), term() -&gt; Slither.Item.t())}
```

# `run_batches`

```elixir
@spec run_batches(
  [{pos_integer(), [Slither.Item.t()]}],
  module(),
  Slither.Context.t(),
  keyword()
) :: {:ok, [Slither.Item.t()]} | {:error, term(), [Slither.Item.t()]}
```

Execute batches with bounded concurrency, returning all results in order.

# `stream_batches`

```elixir
@spec stream_batches(
  [{pos_integer(), [Slither.Item.t()]}],
  module(),
  Slither.Context.t(),
  keyword()
) :: Enumerable.t()
```

Execute batches returning a lazy stream of results.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
