# `Continuum.Runtime.Engine`
[🔗](https://github.com/Yyeger/Continuum/blob/main/lib/continuum/runtime/engine.ex#L1)

GenServer-per-run. The heart of replay.

Each run is owned by exactly one Engine GenServer process; the process is
started by `start_run/3` under `Continuum.Runtime.RunSupervisor`.

The same replay loop runs against both the in-memory journal and the
Postgres journal. Postgres durability, scheduling, and fencing are provided
by the journal adapter and runtime pollers around this engine.

# `await`

Block the caller until the run completes (or `timeout` ms elapses).

Polls the journal at 5 ms intervals. Source of truth is the journal —
works even after the engine process has exited.

Accepts `journal:` in opts to override which journal adapter to poll.

# `broadcast_run_finished`

# `cancel`

Cancel a running workflow.

# `start_run`

Start a fresh workflow run.

# `wake`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
