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.signal_channel

Signal a wait-for channel, releasing anything waiting on it.

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

Description#

Server::wait_for_channel() is the other half, and either order works: tmux keeps a signal nobody is waiting on, so a command that finishes before its watcher starts does not lose the race. The latch releases one wait, and one signal releases every waiter already there. Signalling the same channel twice before a wait clears the latch, so this operation is not idempotent.

Signalling is not scoped to a pane or a session. The channel is a name on the server, so anything that can reach the socket can signal it, which is what makes it useful for telling an orchestrator that a command inside a pane is done.

Errors

Returns an error when tmux refuses the channel name.

Parameters

Guides#

Pages that discuss signal_channel.

Esc

Type to search.

Reference previewOpen reference