Core LibraryunreleasedAPI Reference

Choose documentation 2

latest

Current version

latest
English

Unreleased libtmux has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-lisp latest

libtmux:wait-for

Wait, signal, lock or unlock the literal CHANNEL; return a COMMAND-OUTCOME. OPERATION is :WAIT (default), :SIGNAL, :LOCK or :UNLOCK. CHANNEL is a nonempty string without NUL. This call performs I/O on an existing daemon. :WAIT and :LOCK require tmux 3.8, whose client-loss handling removes queued waiters; older daemons signal UNSUPPORTED-CAPABILITY before dispatch. :SIGNAL and :UNLOCK support the library's tmux floor.

Source and package
Qualified name
libtmux:wait-for
Declared in
libtmux
Package
libtmux
Source
src/server-operations.lisp
(wait-for client channel &key (operation :wait) cancel-token timeout output-limit)

Public owner: libtmux

Description#

A signal wakes current waiters or retains one pending wake. Repeated signals are not an idempotent latch or a counting semaphore. Locks have no owner and survive this call and CLOSE-CLIENT within the daemon's lifetime; unlock them explicitly. Continuation does not identify a sender; server shutdown can flush waiting requests. Signals and locks share a channel, so applications should use separate names for those protocols.

One operation owns CLIENT at a time. Use another client to signal or unlock a blocked call. TIMEOUT and OUTPUT-LIMIT cover preflight and waiting together. Cancellation or lost acknowledgement can leave signal consumption or a lock grant uncertain; inspect ERROR-OUTCOME. Never retries or unlocks automatically. Signals INVALID-ARGUMENT, COMMAND-FAILED or an operational condition.

See also: libtmux:cancel, libtmux:close-client, libtmux:error-outcome, libtmux:outcome-status, libtmux:unsupported-capability.

tmux command#

The tmux commands behind wait-for.

tmux C API#

The C declarations in tmux that implement these commands.

Guides#

Pages that discuss wait-for.

Esc

Type to search.

Reference previewOpen reference