# LibTmux.PaneObservation.WatchAsync

- **Module:** LibTmux.PaneObservation
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/320dc64f4b8b7815842471327a5e6b84a1499bf8/src/LibTmux/ControlMode/PaneObservation.cs#L42
- **Page:** https://libtmux.org/en/dotnet/latest/reference/libtmux-paneobservation-watchasync/

```
LibTmux.PaneObservation.WatchAsync(session: IControlModeSession, pane: Pane, cancellationToken: CancellationToken) -> IAsyncEnumerable<TmuxEvent>
```

Watches one pane's output until it ends.

## Parameters

- `session` (IControlModeSession): The control client to watch through.
- `pane` (Pane): The pane to watch.
- `cancellationToken` (CancellationToken): Stops watching.

## Returns

The pane's own output, ending with <see cref="TmuxExitEvent" /> when the
control client itself ended, or with <see cref="TmuxPaneGoneEvent" />
once the pane is confirmed gone. It never hangs: every arrangement
change that might mean the pane left is checked as it arrives.
