Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

Unreleased libtmux_erlang has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-erlang latest

tmux_server:with_owned/2

Start an owned daemon, run a callback in the calling process, then stop it. Performs start_owned/1 and token-based stop_owned/1 around the callback. With successful cleanup, returns {ok, Value} or re-raises the original callback exception. A returned error tuple is an ordinary callback value. Startup failure passes through without invoking the callback.

Source and package
Qualified name
tmux_server:with_owned/2
Declared in
tmux_server
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_server.erl
with_owned(Options, Function) -spec with_owned(owned_options(), fun((t()) -> Value)) -> {ok, Value} | {error, scope_failure() | map()}.

Description#

Cleanup failure returns scope_failure/0, including both server and ownership handles for inspection and an explicit stop retry. It preserves the callback outcome and cleanup evidence separately; it never claims timeout is retirement. See with_server/2 for callback and separately allocated resource obligations.

Parameters

Guides#

Pages that discuss with_owned/2.

Esc

Type to search.

Reference previewOpen reference