# Libtmux_eio.Client.wait_for

- **Module:** Libtmux_eio
- **Package:** libtmux-eio
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/eio/libtmux_eio.mli#L278
- **Public owner:** Libtmux_eio
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_eio-client-wait_for/

```
val wait_for : t -> string -> (unit, Libtmux.Error.t) result
```

Wait on a named tmux semaphore using a dedicated bound lane.

## Parameters

- `arg1` (`t`)
- `arg2` (`string`)

## tmux command

The tmux commands behind `wait_for`.

- [`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)

## In other ports

Wait for, signal or lock a channel

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.wait_for`](/en/py/latest/reference/libtmux-server-wait_for/) (method) |
| Ruby | [`LibTmux::Server#wait_for`](/en/ruby/latest/reference/libtmux-server-wait_for/) (method) |
| Erlang | [`tmux_command:wait_for/2`](/en/erlang/latest/reference/tmux_command-wait_for-2/) (function). Builds a command value; construction performs no I/O. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no equivalent on `Server` |
| Rust | [`server.Server.wait_for_channel`](/en/rs/latest/reference/server-server-wait_for_channel/) (method) |
| Go | [`tmux.Server.WaitFor`](/en/go/latest/reference/tmux-server-waitfor/) (method) |
| Java | no equivalent on `Server` |
| C# | [`LibTmux.Server.WaitForAsync`](/en/csharp/latest/reference/libtmux-server-waitforasync/) (method) |
| C++ | [`libtmux::Server::wait_for`](/en/cxx/latest/reference/libtmux-server-wait_for/) (method) |
| Swift | [`Server.wait(for:)`](/en/swift/latest/reference/server-wait(for-)/) (method) |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

No equivalent is recorded in Lua, PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.
