PaneObservation.WatchAsync
Watches one pane's output until it ends.
Source and package
- Module
- LibTmux
- Declared in
- PaneObservation
- Package
- LibTmux
- Source
- src/LibTmux/ControlMode/PaneObservation.cs
- WatchAsync ( session : IControl
Mode , pane : Pane , cancellationToken : CancellationSession Token ) IAsyncEnumerable <TmuxEvent > ( session : IControlMode , panes : IReadSession Only <Pane> , cancellationToken : CancellationCollection Token ) IAsyncEnumerable <TmuxEvent > -
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 ( IControl
Mode ) – The control client to watch through.Session -
pane ( Pane ) – The pane to watch. (for
WatchAsync(session, pane, cancellationToken)) -
cancellationToken ( Cancellation
Token ) – Stops watching. -
panes ( IRead
Only <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)) - Raises
-
-
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))
-