Raxol.Agent.Policy.Timeout (Raxol Agent v2.6.0)

Copy Markdown View Source

Timeout policy: abort an operation after :wall_ms elapsed wall-clock time.

Implementation: Raxol.Agent.PolicyApplier spawns the wrapped function in a Task and uses Task.yield/2 + Task.shutdown/2 to enforce the bound. On timeout the result is {:error, :timeout} and a [:raxol, :agent, :policy, :timeout] telemetry event fires.

Fields

  • wall_ms -- timeout in milliseconds; must be >= 1

Constructors

Policy.Timeout.new(30_000)
Policy.Timeout.new(wall_ms: 30_000)

Summary

Functions

Construct a timeout policy from a positive integer or keyword opts.

Types

t()

@type t() :: %Raxol.Agent.Policy.Timeout{wall_ms: pos_integer()}

Functions

new(wall_ms)

@spec new(pos_integer() | keyword()) :: t()

Construct a timeout policy from a positive integer or keyword opts.