# server.builder.ServerBuilder.dispatch_limits

- **Module:** server.builder.ServerBuilder
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/server/builder.rs#L143
- **Page:** https://libtmux.org/en/rs/latest/reference/server-builder-serverbuilder-dispatch_limits/

```
server.builder.ServerBuilder.dispatch_limits(mut, limits: DispatchLimits) -> Self
```

Bound how many commands may run at once.

Each one is a tmux client process with its own pipes and reader tasks,
and tmux serializes them on the far side anyway, so past a point more
clients buy queueing rather than throughput. A caller that fans out
wide -- an agent, a reconciler sweeping every pane -- otherwise turns
its own concurrency into pressure on the machine.

## Example

```rust
use libtmux::DispatchLimits;

let server = libtmux::Server::builder()
    .dispatch_limits(DispatchLimits::default().max_in_flight(4))
    .build()?;
```
