Durable operations
A durable operation is an explicit point where Trigora can commit continuation state. Between those calls, control flow is ordinary code.
| Operation | TypeScript | Python | Rust | What it commits |
|---|---|---|---|---|
| Effect | effect(name, fn) | effect(name, fn) | effect(name, closure) | The outcome of the body, keyed by name |
| Event wait | waitForEvent(name) | wait_for_event(name) | wait_for_event(name) | That the Execution is waiting on name |
| Timer | sleep(duration) | sleep(duration) | sleep(duration_ms) | The wake time |
| Child | invoke(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.