Skip to content
Trigora
Start building →

Durable operations

A durable operation is an explicit point where Trigora can commit continuation state. Between those calls, control flow is ordinary code.

OperationTypeScriptPythonRustWhat it commits
Effecteffect(name, fn)effect(name, fn)effect(name, closure)The outcome of the body, keyed by name
Event waitwaitForEvent(name)wait_for_event(name)wait_for_event(name)That the Execution is waiting on name
Timersleep(duration)sleep(duration)sleep(duration_ms)The wake time
Childinvoke(program, ...args)invoke(name, *args)invoke(child, args)The child Execution and, later, its result

Promise.all / Promise.race, gather / race, and Rust join / race are control flow over those operations, not extra operations. See Structured concurrency.

Names and event strings must be literals. effect(fn) without a name is rejected.

These calls throw if you invoke the Program file directly. They run only inside an Execution started by the CLI or client.

See each page for signature, failure, and one example: Effects, waitForEvent, sleep, invoke.