# LibTmux.Testing.TmuxWait.UntilAsync

- **Module:** LibTmux.Testing.TmuxWait
- **Package:** LibTmux
- **Language:** .NET
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/6656a563ec9e07ab52e0c3ac96f7704fc94cc0c0/src/LibTmux/Testing/TmuxWait.cs#L22
- **Page:** https://libtmux.org/reference/dotnet/libtmux-testing-tmuxwait-untilasync/

```
LibTmux.Testing.TmuxWait.UntilAsync(probe: Func<CancellationToken, Task<bool>>, timeout: TimeSpan, interval: TimeSpan, throwOnTimeout: bool, cancellationToken: CancellationToken) -> Task<bool>
```

Waits until a probe reports the state was reached.

## Parameters

- `probe` (Func<CancellationToken, Task<bool>>) — Answers whether the state has been reached.
- `timeout` (TimeSpan) — How long to keep asking.
- `interval` (TimeSpan) — How long to wait between askings.
- `throwOnTimeout` (bool) — Whether running out is a failure.
- `cancellationToken` (CancellationToken) — Cancels the wait.

## Returns

True when the state was reached.

## Raises

- `TmuxWaitTimeoutException` — The state was not reached and running out was to be a failure.
