# LibTmux.Operation.await/2

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/66b9b1c3f3f3186428abdfda2c76f5cf87446710/lib/libtmux/operation.ex#L153
- **Page:** https://libtmux.org/en/elixir/latest/reference/libtmux-operation-await-2/

```
await(operation, options \\ [])
@spec await(t(), [option()]) ::
        {:ok, result()} | {:error, LibTmux.Error.t()}
```

Waits for a canonical result under one positive millisecond timeout.

The default is 5000ms. Every call claims an independent bounded waiter slot,
including terminal operations; use `result/1` for immediate inspection.
Completed waiter copies survive record reclamation until this caller reads
them. Timeout, overload and caller death affect only this waiter.

See the [worked example](advanced-execution.html).

## Parameters

- `operation` (`t()`)
- `options` (`[option()]`)
