Session.HoldWaitClientAsync
Keeps the control client that waits on this session's panes use attached until the handle is disposed.
Source and package
- Module
- LibTmux
- Declared in
- Session
- Package
- LibTmux
- Source
- src/LibTmux/Session.Scopes.cs
- HoldWaitClientAsync ( cancellationToken : Cancellation
Token ) Task<IAsyncDisposable > -
Description#
A wait on a pane attaches a control client to the pane's session and reads through it, and lets it go when the wait ends unless another wait still needs it. Attaching costs about as much as a tmux process start, so holding the client saves that for each wait in a series, which then costs little more than the keys it sends.
The client ignores its size, so it leaves window sizes alone, and is excluded wherever this library tells observers from people attached. tmux itself still lists it among the session's clients while it is held, so the session counts as attached for
destroy-unattached, and the client keeps reading the session's output while no wait runs. The hold is for this server process: one started again needs a new one. When control mode is unavailable the waits poll, and the handle holds nothing.- Parameters
-
-
cancellationToken ( Cancellation
Token ) – Cancels attaching the client.
-
- Returns
-
A handle; disposing it lets the client detach once no wait needs it.