PtcRunner.Lisp.Eval.Parallel (PtcRunner v0.14.0)

Copy Markdown View Source

Evaluator-owned semantics for pmap and pcalls.

This module adapts evaluated Lisp callables into worker callbacks, captures each worker's effects and child metadata, classifies evaluator failures, and assembles the outer parallel-operation record. Process scheduling, heap caps, deadlines, cancellation, and monitor cleanup belong to ParallelRunner.

Summary

Functions

Executes already-evaluated zero-arity pcalls function values.

Executes an already-evaluated pmap callable over evaluated collections.

Types

do_eval()

@type do_eval() :: (term(), PtcRunner.Lisp.Eval.Context.t() ->
                {:ok, term(), PtcRunner.Lisp.Eval.Context.t()}
                | {:error, term()}
                | {:error, term(), PtcRunner.Lisp.Eval.Context.t()})

Functions

eval_pcalls(function_values, eval_context, do_eval)

@spec eval_pcalls([term()], PtcRunner.Lisp.Eval.Context.t(), do_eval()) :: term()

Executes already-evaluated zero-arity pcalls function values.

Callable/arity validation is a preflight step and therefore records no parallel call when it fails.

eval_pmap(fn_value, collection_values, eval_context, do_eval)

@spec eval_pmap(term(), [term()], PtcRunner.Lisp.Eval.Context.t(), do_eval()) ::
  term()

Executes an already-evaluated pmap callable over evaluated collections.

Type/shape validation performed before the runner starts returns an ordinary evaluator error and records no parallel call. Once scheduling begins, every success or failure appends one outer operation record.