durable_sleep

command
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Example: durable_sleep

Demonstrates a durable Sleep step. Unlike time.Sleep inside an activity, a Sleep step hard-suspends the execution: the goroutines exit, the checkpoint records an absolute WakeAt, and the host process can die and restart without losing the deadline. On resume, the branch wakes as soon as the wall clock passes WakeAt.

This example uses a very short duration so it runs end-to-end in under a second. In production, consumers enqueue a delayed resume job at result.NextWakeAt() and call runner.Run again when it fires.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL