# Libtmux_unix.Cancellation

- **Package:** libtmux-unix
- **Language:** OCaml
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/unix/libtmux_unix.mli#L63
- **Public owner:** Libtmux_unix
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_unix-cancellation/

```ocaml
module Cancellation
```

## Members

### Common operations

- [`Cancelled`](/en/ocaml/latest/reference/libtmux_unix-cancellation-cancelled/) (exception)
- [`with_`](/en/ocaml/latest/reference/libtmux_unix-cancellation-with_/) (function): Own a cancellation token for the callback's lifetime. Leaving the scope cancels outstanding waiters and releases its descriptors after they finish. An escaped token is cancelled and cannot be reused.

### Other members

- [`cancel`](/en/ocaml/latest/reference/libtmux_unix-cancellation-cancel/) (function): Wake waiters. Safe from another domain or systhread, but not from a signal handler. Repeated calls and calls after scope exit have no effect.
- [`t`](/en/ocaml/latest/reference/libtmux_unix-cancellation-t/) (typealias)

## Guides

Pages that discuss `Cancellation`.

- [Compatibility](/en/ocaml/latest/guides/compatibility/)
