# LibTmux.FSharp.Pane.waitFor

- **Module:** LibTmux.FSharp
- **Package:** LibTmux.FSharp
- **Language:** F#
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.FSharp/Hierarchy.fsi#L248
- **Page:** https://libtmux.org/en/fsharp/latest/reference/libtmux-fsharp-pane-waitfor/

```
val waitFor:
        cancellationToken: CancellationToken -> request: PaneWaitRequest -> pane: LibTmux.Pane -> Task<PaneWaitResult>
```

Waits as the request describes: patterns, stop patterns, or any output.

Running out of time returns the outcome <c>TimedOut</c>; only <c>Mirror.waitUntil</c> raises instead.

## Parameters

- `cancellationToken` (`CancellationToken`)
- `request` (`PaneWaitRequest`)
- `pane` (`LibTmux.Pane`)

## Raises

- [`LibTmux.TmuxPaneException`](/en/csharp/latest/reference/libtmux-tmuxpaneexception/): The pane's program had already exited.
- [`LibTmux.TmuxObjectNotFoundException`](/en/csharp/latest/reference/libtmux-tmuxobjectnotfoundexception/): tmux no longer has the pane.
