Operation
A retained operation handle pinned to its original owner, tables and epoch.
Source and package
- Qualified name
-
LibTmux .Operation - Module
- LibTmux
- Package
- libtmux
- Source
- lib/libtmux/operation.ex
-
Description#
result/1andstatus/1read local retained values.await/2owns a separate bounded waiter; its timeout never stops the operation.stop/1requests closure of the operation's entire connection epoch, including siblings. It does not roll back effects or prove native cleanup.Canonical results carry
outcome,certaintyandevidence. Completed, failed, skipped and unknown outcomes remain values, including in bang APIs. Bang functions raise only API or metadata errors. A command reply is distinct from wire retirement and arbitrary program exit.Normal reconnect preserves retained records until forget or expiry. Owner replacement loses those tables; a handle never follows a replacement view. Handles recovered from
LibTmux.Control.execute/3errors also remain owned by that original caller: its death permits reclamation after wire retirement.Discussed in Read values, execute explicitly · Execution ownership
Members18#
Common operations2#
Other members16#
- await!/2 function Waits or raises API errors; canonical failed, skipped and unknown outcomes remain values.
- command_result/0: command
_result () :: %{ outcome: :completed | :failed, certainty: :acknowledged, evidence: :command_reply, guard: LibTmux (), lines: [binary()] } typealias A qualified command reply, independently of wire retirement or program completion..Protocol .guard _id - forget!/2 function Forgets the retained record or raises the same structured error.
- forget/2 function Requests exact-record reclamation with a default 5000ms timeout.
- option/0: option() :: {:timeout, pos
_integer ()} typealias A positive millisecond budget for one waiter or record-reclamation call. - result!/1 function Reads a result or
:pending; raises API errors, preserving all canonical outcomes. - result/0: result() ::
command
_result () | skipped_result () | unknown_result () typealias The immutable canonical outcome; failed, skipped and unknown outcomes remain values. - result/1 function Returns a canonical result,
:pending, or a retained-context error. - skipped_result/0: skipped
_result () :: %{ outcome: :skipped, certainty: :no_write, evidence: :cancelled | :timeout | :epoch_closed } typealias A canonical no-write outcome, with the reason it was skipped before dispatch. - status!/1 function Reads retained status or raises the same structured error.
- status/0: status() :: %{wire: wire(), result: result() | nil} typealias Retained wire progress and the canonical result, or nil while no outcome is established.
- status/1 function Reads retained wire state and canonical result without contacting tmux.
- stop!/1 function Requests epoch closure or raises the same structured error.
- t/0 typealias A retained owner-bound operation handle; it is not a command result or a reservation.
- unknown_result/0: unknown
_result () :: %{ outcome: :unknown, certainty: :unknown, evidence: :epoch_closed } typealias An epoch closed without enough evidence to classify the operation's effects. - wire/0: wire() :: :unpublished | :unsent | :writing | :awaiting | :closing | :retired typealias Wire progress for this operation; retired wire does not prove connection cleanup.