# LibTmux::Server.wait-for-async

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/e76160bcce6e03976d49424da15b7c31afb2c68e/lib/LibTmux/Server.rakumod#L526
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-server-wait-for-async/

```
method wait-for-async(Mu $channel, Mu :$action = 'wait',
                     Cancellation :$cancel = Cancellation --> Promise:D)
```

Resolve one channel operation within the Server deadline, without readiness polling.

Resolve one channel operation within the Server deadline, without readiness polling.

## Parameters

- `$channel` (`Mu`)
- `$action?` (`Mu`)
- `$cancel?` (`Cancellation`)

## tmux command

The tmux commands behind `wait-for-async`.

- [`wait-for`](/en/tmux/latest/manual/wait-for/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_wait_for_entry`](/en/tmux/latest/reference/c-variable-cmd_wait_for_entry/) (attribute)
- [`cmd_wait_for_exec`](/en/tmux/latest/reference/c-function-cmd-wait-for-c-cmd_wait_for_exec/) (function)
