# Libtmux_unix.Client.await

- **Module:** Libtmux_unix
- **Package:** libtmux-unix
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/unix/libtmux_unix.mli#L259
- **Public owner:** Libtmux_unix
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_unix-client-await/

```
val await :
  ?cancel:Cancellation.t -> 'a Operation.t -> ('a, Libtmux.Error.t) result
```

Pump admitted work until this operation is finished. Only one blocking caller may own the client at a time. Cancellation removes queued work or drains admitted work before raising `Cancellation.Cancelled`. The handle retains its outcome. Draining has at most one exchange timeout from detection; local scratch filesystem I/O and owned-child cleanup must also finish. Each owned child gets 200 ms of TERM grace before forced termination and reaping; scheduling and kernel completion can add time. No background scheduler or worker is started.

## Parameters

- `cancel?` (`Cancellation.t`)
- `arg1` (`'a Operation.t`)
