Core Library0.xAPI reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

method libtmux-dotnet

PaneObservation.WatchAsync

Watches one pane's output until it ends.

Source and package
Qualified name
LibTmux.PaneObservation.WatchAsync
Namespace
LibTmux
Declared in
PaneObservation
Package
LibTmux
Source
src/LibTmux/ControlMode/PaneObservation.cs

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 with remain-on-exit.

Parameters
Returns

The pane's own output, with TmuxPanePausedEvent and TmuxPaneContinuedEvent around output a slow reader missed, ending with TmuxExitEvent when the control client itself ended, or with TmuxPaneGoneEvent once the pane is confirmed gone. Loss reports require resynchronization; buffered output precedes pane termination for watermark-backed control sessions. The client remains borrowed. for WatchAsync(session, pane, cancellationToken)

The panes' own output in the order tmux sent it, with TmuxPanePausedEvent and TmuxPaneContinuedEvent around output a slow reader missed. Each pane confirmed gone is reported by a TmuxPaneGoneEvent after 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 with TmuxExitEvent when the control client itself ended. The client remains borrowed. for WatchAsync(session, panes, cancellationToken)

Errors
  • ArgumentException – 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. for WatchAsync(session, pane, cancellationToken)

  • InvalidOperationException – 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 when swap-window trades the window with another session's, so that move leaves the watch silent. for WatchAsync(session, pane, cancellationToken)

  • NotSupportedException – 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. for WatchAsync(session, pane, cancellationToken)

  • ArgumentException – panes is 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. for WatchAsync(session, panes, cancellationToken)

  • InvalidOperationException – 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 when swap-window trades the window with another session's, so that move leaves the watch silent. for WatchAsync(session, panes, cancellationToken)

  • NotSupportedException – 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. for WatchAsync(session, panes, cancellationToken)

Recorded calls

source calls
No call edges in the C# model.

The 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.

Esc
Search in

Type to search.

Reference previewOpen reference