PaneObservation.WatchAsync
Watches one pane's output until it ends.
Source and package
- Qualified name
-
LibTmux .Pane Observation. Watch Async - Namespace
- LibTmux
- Declared in
PaneObservation- Package
- LibTmux
- Source
- src/LibTmux/ControlMode/PaneObservation.cs
- static IAsync
Enumerable <TmuxEvent > WatchAsync( IControlMode session, Pane pane, CancellationSession Token cancellationToken = default )static IAsyncEnumerable <TmuxEvent > WatchAsync( IControlMode session, IReadSession Only <Pane> panes, CancellationCollection Token cancellationToken = default ) -
Description
tmux discards output it has not yet sent to a control client once the pane's program exits, so the last lines of a program that exits at once may never arrive. Read final output with
RunAsync(), or capture a pane kept withremain-on-exit.- Parameters
-
-
session(IControlMode ) – The control client to watch through.Session -
pane(Pane) – The pane to watch. forWatchAsync(session, pane, cancellationToken) -
cancellationToken(CancellationToken ) – Stops watching.Default
default -
panes(IReadOnly <Pane>) – The panes to watch; at least one. forCollection WatchAsync(session, panes, cancellationToken)
-
- Returns
-
The pane's own output, with
TmuxPanePausedEventandTmuxPaneContinuedEventaround output a slow reader missed, ending withTmuxExitEventwhen the control client itself ended, or withTmuxPaneGoneEventonce the pane is confirmed gone. Loss reports require resynchronization; buffered output precedes pane termination for watermark-backed control sessions. The client remains borrowed. forWatchAsync(session, pane, cancellationToken)The panes' own output in the order tmux sent it, with
TmuxPanePausedEventandTmuxPaneContinuedEventaround output a slow reader missed. Each pane confirmed gone is reported by aTmuxPaneGoneEventafter the output buffered before it went, unless the client ends first; panes found gone together are reported in the order given. The stream ends once every pane is gone, or withTmuxExitEventwhen the control client itself ended. The client remains borrowed. forWatchAsync(session, panes, cancellationToken) - Errors
-
-
Argument
Exception – When reading starts, the pane is in a session other than the one the client is attached to; tmux sends a control client output only from its own session. forWatchAsync(session, pane, cancellationToken) -
Invalid
Operation – While reading, the pane's window left the client's session, or the client moved to another session, so tmux sends none of its output any more. tmux announces no change whenException swap-windowtrades the window with another session's, so that move leaves the watch silent. forWatchAsync(session, pane, cancellationToken) -
Not
Supported – A control session without an event watermark cannot establish which output was buffered before pane termination. Its watch fails when the pane is confirmed gone, without consuming another event. forException WatchAsync(session, pane, cancellationToken) -
Argument
Exception –panesis empty, or, when reading starts, a pane is in a session other than the one the client is attached to; tmux sends a control client output only from its own session. forWatchAsync(session, panes, cancellationToken) -
Invalid
Operation – While reading, a pane's window left the client's session, or the client moved to another session, so tmux sends none of its output any more. tmux announces no change whenException swap-windowtrades the window with another session's, so that move leaves the watch silent. forWatchAsync(session, panes, cancellationToken) -
Not
Supported – A control session without an event watermark cannot establish which output was buffered before a pane ended. Its watch fails when a pane is confirmed gone, without consuming another event. forException WatchAsync(session, panes, cancellationToken)
-
Recorded calls
source callsThe 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.PaneObservation.WatchAsync.