Runtime Lifecycle
Runtime Lifecycle
Clockwork runtime lifecycle is managed by qti-clockwork-app.
AppBuilder Phase
AppBuilder is a pre-runtime composition API.
It gathers:
- component schemas
- systems and stage placement
- resources
- asset loaders/registrations
- plugins
Build Phase
build() performs:
- plugin dependency resolution
- plugin
initexecution in dependency order WorldcreationEventBuscreationSchedulercreation- resource + system installation
Appcreation and plugin manager attach
Run Phase
app.run() marks scheduler active.
app.step(dt) executes stage pipeline if running:
Boot(once)PreUpdateFixedUpdate(sub-step loop)UpdateLateUpdateRenderPrepRenderPostRender
app.shutdown() runs scheduler Shutdown stage, then plugin shutdown in reverse initialization order.
Key Guarantees
- Boot runs once per runtime instance.
- Command buffers flush after each stage execution.
- Async systems are rejected in sync-only stages.
- Plugin shutdown order is reverse dependency-safe order.