Typed process state for the editor-owned slow-effect scheduler.
Summary
Functions
Builds initial scheduler state from validated process options.
Types
@type t() :: %MingaEditor.EffectScheduler.State{ admitted: MapSet.t(MingaEditor.Effect.Request.id()), claimed: MapSet.t(MingaEditor.Effect.Request.id()), lanes: %{ optional(MingaEditor.Effect.Request.resource()) => MingaEditor.EffectScheduler.Lane.t() }, max_admitted: pos_integer(), observer: pid() | nil, owner: pid() | nil, owner_monitor: reference() | nil, pending: %{ optional(MingaEditor.Effect.Request.id()) => MingaEditor.Effect.Outcome.t() }, task_supervisor: GenServer.server(), tasks: %{optional(reference()) => task_entry()}, timers: %{optional(reference()) => MingaEditor.Effect.Request.id()} }
@type task_entry() :: {MingaEditor.Effect.Request.resource(), MingaEditor.Effect.Request.id(), Task.t()}
Scheduler-owned worker identity kept outside lane values.
Functions
@spec new(GenServer.server(), pid() | nil, pos_integer()) :: t()
Builds initial scheduler state from validated process options.