libtmux Reference MCP Search
On this page

test.TestServer.shutdown

View as Markdown

Module
test
Declared in
TestServer
Package
libtmux
Source
crates/libtmux/src/test.rs
shutdown ( mut ) Result<(), TestServerError>
method [source]
method [source]
shutdown

Stop the client executor and consume the daemon guard.

Errors

Returns ShutdownFailed when executor closure, lifecycle signaling/waiting, or the blocking waiter fails. Returns CleanupFailed when descriptor-relative cleanup cannot be proved after lifecycle processing.

This consumes the guard, closes its shared no-start executor, and then terminates the retained foreground daemon. Escaped [Server] clones cannot issue later commands.

Cancelling this future before lifecycle ownership transfers leaves the guard responsible for synchronous forced best-effort cleanup. Once this future transfers ownership to its blocking waiter, that waiter completes cleanup even if this future is cancelled; later cleanup failures are unobservable to the cancelled caller.

Examples

let guard = libtmux::test::TestServer::new().await?;
guard.shutdown().await?;

0 declared, 0 inherited

Esc

Type to search.