limits.DispatchLimits
Rust
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- limits
- Package
- libtmux
- Source
- crates/libtmux/src/limits.rs
-
How much work one server may have in flight at once.
Every dispatch is a tmux client process with its own pipes and reader tasks. Without a ceiling, a caller that fans out -- an agent driving the MCP server, a reconciler sweeping every pane -- turns its own concurrency into process, descriptor, and memory pressure on the machine, and tmux itself serializes on the far side regardless.
The client
Server::wait_for_channelparks on a channel is the exception, and is not counted: it is waiting rather than working, and what releases it is a dispatch of its own.Examples
use libtmux::DispatchLimits;let limits = DispatchLimits::default().max_in_flight(4);assert_eq!(limits.in_flight(), 4);
4 declared, 0 inherited
Members
- acquire_timeout method How long a dispatch waits for a permit before giving up.
- DEFAULT_IN_FLIGHT constant How many dispatches may run at once by default.
- in_flight method How many dispatches may run at once.
- max_in_flight method Set how many dispatches may run at once.