PtcRunner.Lisp.Eval.ParallelRunner.Envelope (PtcRunner v0.14.0)

Copy Markdown View Source

One indexed result returned by PtcRunner.Lisp.Eval.ParallelRunner.

Worker callbacks construct an unindexed envelope. The runner overwrites the index from its own scheduling state before the envelope crosses the worker boundary, making that index authoritative for ordering and failure reports.

Summary

Types

outcome()

@type outcome() :: {:ok, term()} | {:error, term()}

t()

@type t() :: %PtcRunner.Lisp.Eval.ParallelRunner.Envelope{
  child_step: term() | nil,
  child_trace_id: term() | nil,
  effects: PtcRunner.Lisp.Eval.Effects.t(),
  index: non_neg_integer() | nil,
  outcome: outcome()
}

Functions

failure(reason, opts \\ [])

@spec failure(
  term(),
  keyword()
) :: t()

success(value, opts \\ [])

@spec success(
  term(),
  keyword()
) :: t()

success?(envelope)

@spec success?(t()) :: boolean()