baml.spawn.Root

Spawns a task whose cancellation parent is the runtime, not the spawning task: cancelling the spawner no longer cancels it.

Reference version

Signature

class baml.spawn.Root

Spawns a task whose cancellation parent is the runtime, not the spawning task: cancelling the spawner no longer cancels it.

Nothing else changes. The Future still reports the task's outcome and can still cancel it, and an error nobody observes is still reported.

Source:<builtin>/baml/ns_spawn/spawn.bamlbytes 6345–6449

Static methods

function

new

() -> baml.spawn.Root throws never

Creates a Root.

Implementations

baml.Concrete for T

Source:<builtin>/baml/core.bamlbytes 763–795