Core LibraryAPI Reference

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

C# API

method libtmux-dotnet latest

Server.WaitForAsync

Namespace LibTmux.Server.WaitForAsync LibTmux

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

View as Markdown

Source and package
Module
LibTmux
Declared in
Server
Package
LibTmux
Source
src/LibTmux/Server.Execution.cs
Other languages
PythonRuby Lua TypeScript RustGo Java C++Swift Kotlin Scala F#
WaitForAsync ( request : WaitForRequest , cancellationToken : CancellationToken ) → Task
method [source]

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 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 Wait needs a deadline. For 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.

tmux command wait-for

In other ports Wait for, signal or lock a channel
Esc

Type to search.