Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-rs latest

Server.shutdown

Stop accepting clients and wait for every active client process.

Source and package
Qualified name
libtmux::server::Server::shutdown
Module
server
Declared in
Server
Package
libtmux
Source
crates/libtmux/src/server.rs
pub async fn shutdown(&self) -> Result<(), Error>

Description#

Shutdown is idempotent and affects every clone of this server. It never stops the tmux daemon itself. Await it before dropping the Tokio runtime when deterministic reaping matters. With control mode enabled, this also closes persistent control connections.

Errors

Propagates failures reported by the shared executor shutdown boundary.

Examples#

let server = libtmux::Server::new()?;
server.shutdown().await?;
server.shutdown().await?;

Guides#

Pages that discuss shutdown.

Esc

Type to search.

Reference previewOpen reference