# LibTmux::Model::ClientRef.lock

- **Module:** LibTmux::Model
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/0b5dd3d32e20f83a0069874e33eab0eb48f55962/lib/LibTmux/Client.rakumod#L323
- **Inherited from:** LibTmux::Client::ClientTarget
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-model-clientref-lock/

```
method lock(*%operation --> Result:D)
```

Invoke the configured lock command for this client.

Invoke the configured lock command for this client.

## Parameters

- `%operation`

## tmux command

The tmux commands behind `lock`.

- [`lock-client`](/en/tmux/latest/manual/lock-client/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_lock_client_entry`](/en/tmux/latest/reference/c-variable-cmd_lock_client_entry/) (attribute)
- [`cmd_lock_server_exec`](/en/tmux/latest/reference/c-function-cmd-lock-server-c-cmd_lock_server_exec/) (function)

## In other ports

Lock one client

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Server.lock_client`](/en/py/latest/reference/libtmux-server-lock_client/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no equivalent on `Server` |
| Rust | no equivalent on `Server` |
| Go | [`tmux.Server.LockClient`](/en/go/latest/reference/tmux-server-lockclient/) (method) |
| Java | no equivalent on `Server` |
| C# | [`LibTmux.Server.LockClientAsync`](/en/csharp/latest/reference/libtmux-server-lockclientasync/) (method) |
| C++ | no equivalent on `Server` |
| Swift | no equivalent on `Server` |
| OCaml | No direct public OCaml equivalent is recorded for this operation. |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

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