# tmux_pane_text:cancel/1

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/38478dff54579a4f408005d0265031abdf3a880a/apps/libtmux_erlang/src/tmux_pane_text.erl#L68
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_pane_text-cancel-1/

```
cancel(Wait)
-spec cancel(t()) ->
                {ok, cancel_requested | already_completed} |
                {error, map()}.
```

Request cancellation. Use `await/2` for the result and cleanup status.

## Parameters

- `Wait` (`t()`)

## Guides

Pages that discuss `cancel/1`.

- [Owned operations](/en/erlang/latest/guides/operations/)
