# server.ServerOptions.maxInFlight

- **Module:** server
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** property
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/server.ts#L149
- **Page:** https://libtmux.org/en/ts/latest/reference/server-serveroptions-maxinflight/

How many tmux invocations this server runs at once. Defaults to 16.

Every invocation is a tmux client process with its own pipes, so a caller
that fans out over a whole server turns its own concurrency into process
and descriptor pressure. tmux runs commands on one thread: `bench-modes.ts`
measures twelve concurrent creations costing the same twenty-five
invocations as twelve sequential ones — twenty-four either way, plus the
query that reads the result back — and arriving out of order, so the
ceiling bounds the cost without bounding the work. Waiting for a slot spends the request's own deadline,
and a request that never gets one fails `not_started`. An invocation that
ends in a wait ([`wait-for`](/en/tmux/latest/manual/wait-for/), a popup or a prompt) takes no slot: it holds a
client for as long as the wait, and its release may need one. A program's
run is one.
