# io.github.libtmux.kotlin.Pane.await

- **Module:** io.github.libtmux.kotlin
- **Package:** io.github.libtmux:libtmux-kotlin
- **Language:** Kotlin
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux-kotlin/src/main/kotlin/io/github/libtmux/kotlin/Pane.kt#L106
- **Page:** https://libtmux.org/en/kotlin/latest/reference/io-github-libtmux-kotlin-pane-await/

```
public suspend fun await(
        timeout: Duration,
        every: Duration = 50.milliseconds,
        dispatcher: CoroutineDispatcher = Dispatchers.IO,
        settled: (Pane) -> Boolean,
    ): WakeReason
```

Waits until [settled] accepts this pane, read fresh from tmux before each test.

Cancelling the coroutine interrupts the wait. That is not a timeout. A read already sent to
tmux is not taken back.

## Parameters

- `timeout` (`Duration`): how long to keep looking, finite and not negative
- `every` (`Duration`): how long to leave between looks, at least 10 ms
- `dispatcher` (`CoroutineDispatcher`): where the blocking wait runs
- `settled` (`(Pane) -> Boolean`)

## Returns

why the wait ended
