# LibTmux.run_batch

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Julia
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-julia/blob/f3da513be1225d36d5854cd8db5972c01857578e/src/batches.jl#L166
- **Page:** https://libtmux.org/en/julia/latest/reference/libtmux-run_batch/

```
run_batch(
    target::Union{LibTmux.ControlConnection, LibTmux.Server},
    commands::AbstractVector{LibTmux.TmuxCommand};
    concurrency,
    timeout,
    cancel
)
```

## Methods

Run at most 256 independent commands with at most 64 worker tasks. Results retain input order; execution order is unspecified. A command error does not skip independent siblings. One monotonic budget includes admission and all workers; cancellation stops new admission and retains sent-effect uncertainty. The call joins every worker before returning. There is no replay or fallback.

```julia
run_batch(target, commands; concurrency=4, timeout=5.0, cancel=nothing)
```



All control commands are validated before effects. Raw `Server` commands retain their responses, but successful per-operation completion is `:unknown` unless the command matches the audited synchronous grammar. This deliberately does not equate an arbitrary process response with background-job completion.

## Parameters

- `target` (`Union{LibTmux.ControlConnection, LibTmux.Server}`)
- `commands` (`Base.AbstractVector{LibTmux.TmuxCommand}`)
- `concurrency` (`Integer`)
  Default: `4`.
- `timeout` (`Real`)
  Default: `5.0`.
- `cancel`
  Default: `nothing`.
