# tmux_operation:await/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_operation.erl#L89
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_operation-await-2/

```
await(Operation, Timeout)
-spec await(t(), timeout()) ->
               {ok, completed()} | {error, failure()}.
```

Wait for a retained result for at most Timeout. An await_timeout removes only this waiter; the operation continues and its handle remains usable. Additional waiters do not become owners. Results preserve outcome and cleanup certainty.

## Parameters

- `Operation` (`t()`)
- `Timeout` (`timeout()`)

## Guides

Pages that discuss `await/2`.

- [Diagnostics](/en/erlang/latest/topics/diagnostics/)
