baml.spawn.Params

The parameters for spawning a new green thread.

Reference version

Signature

class baml.spawn.Params<T, E>

The parameters for spawning a new green thread.

Every spawn implicitly constructs a Params from its name and body; the with pipeline transforms it left-to-right before the runtime creates the future. Each transformer is an ordinary function (Params<T, E>) -> Params<U, F> — it may set config fields, wrap body (retry, timing), or replace it entirely (type-changing transformers like a fallback that erases the error type).

Source:<builtin>/baml/ns_spawn/spawn.bamlbytes 8301201

Fields

body

() -> T throws E

name

string | null

detach

bool

Implementations

baml.Concrete for T

Source:<builtin>/baml/core.bamlbytes 747779