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.

MoreLess about this notice

method libtmux-dotnet

Server.WaitForAsync

Waits on, signals, locks, or unlocks a tmux channel.

Source and package
Qualified name
LibTmux.Server.WaitForAsync
Namespace
LibTmux
Declared in
Server
Package
LibTmux
Source
src/LibTmux/Server.Execution.cs

Description

Waiting blocks until something else signals the channel, so a call that waits does not return on its own. A wait or a lock is not bounded by CommandTimeout: it waits for another client by design, and ending it would leave tmux holding its place.

Parameters
  • request (WaitForRequest) – Which channel, and what to do with it.

  • cancellationToken (CancellationToken) – Cancels waiting for tmux's reply. For TmuxWaitMode.Wait this kills the client, and tmux before 3.8 keeps its queue entry, which takes the next signal: a signal sent while nothing else waits is then spent on that entry instead of waking the next wait. Prefer OpenWaitChannel() whenever a TmuxWaitMode.Wait needs a deadline. For TmuxWaitMode.Lock cancelling never kills the client, since tmux hands a released lock to whichever queued client is still alive: the client keeps running, and a lock it goes on to acquire is released again automatically once this call has already given up on it. A lock that is never released therefore keeps one tmux client queued per cancelled call.

    Default default

Recorded calls

source calls
No call edges in the C# model.

The C# reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls LibTmux.Server.WaitForAsync.

tmux command

task material

The tmux commands behind WaitForAsync.

tmux C API

task material

The C declarations in tmux that implement these commands.

In other ports

task equivalence 9 other ports mapped

Source-verified mappings for Wait for, signal or lock a channel. A mapping says these APIs perform the same task. It does not say they share defaults, errors or completion: check each page.

Wait for, signal or lock a channel in each port
PortAPIDiffers from C#
C# LibTmux.Server.WaitForAsync
Waits on, signals, locks, or unlocks a tmux channel.
This page
Python libtmux.Server.wait_for
Wait for, signal, or lock a channel via $ tmux wait-for.
None recorded in the model
Ruby LibTmux::Server#wait_for
Retiring the client cannot remove a dispatched waiter from tmux's queue.
None recorded in the model
Erlang tmux_command:wait_for/2
Build a native wait-for command without I/O. Channels are nonempty NUL-free binary names, subject to the command reservation in raw/2; neither shell nor format expansion occurs. Submit through tmux_operation:start/3 for a wait that leaves the caller free, or through tmux_server:command/3 to await it.
free function
Builds a command value; construction performs no I/O.
Rust server.Server.wait_for_channel
Wait for a wait-for channel to be signalled.
async
Go tmux.Server.WaitFor
WaitFor waits for, signals, locks, or unlocks a named tmux channel. It changes only that server-side channel state; cancellation can interrupt the client wait but cannot prove a preceding signal or lock did not take effect. See WaitForModeLock: before tmux 3.8, abandoning a lock wait costs that channel one unlock.
None recorded in the model
C++ libtmux::Server::wait_for
Block until someone signals this channel, or the deadline passes.
readonly
Swift Server.wait(for:)
Blocks until something signals channel.
async
OCaml Libtmux_unix.Client.wait_for
Wait on a named tmux semaphore using a dedicated bound lane.
free function
Raku LibTmux::Server.wait-for
Wait, signal, lock or unlock a named channel; timeout cannot undo server-side effects.
Waits, signals, locks or unlocks a named channel within the Server deadline.
No Haskell equivalent.

No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.

No TypeScript equivalent.

no equivalent on Server

No Java equivalent.

no equivalent on Server

No Perl equivalent.

No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands.

No equivalent is recorded in Lua, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc
Search in

Type to search.

Reference previewOpen reference