Backplane.AgentRuntime.Scheduler (backplane_agent_runtime v1.6.0)

Copy Markdown

Bounded work admission with explicit overload.

A scheduler is immutable data. It does not spawn processes or own execution. Host adapters use it to separate bounded execution slots from waiting continuations.

Summary

Types

t()

@type t() :: map()

Functions

admit(scheduler, worker_id, continuation \\ nil)

@spec admit(t(), term(), term()) ::
  {:ok, t(), %{status: :admitted | :queued}}
  | {:error, Backplane.AgentRuntime.Error.t()}

new(limit)

@spec new(non_neg_integer()) ::
  {:ok, t()} | {:error, Backplane.AgentRuntime.Error.t()}

promote(scheduler, worker_id)

@spec promote(t(), term()) :: {:ok, t()} | {:error, Backplane.AgentRuntime.Error.t()}

release(scheduler, worker_id)

@spec release(t(), term()) :: {:ok, t()} | {:error, Backplane.AgentRuntime.Error.t()}