Summary
Follow-up to the Loom render scheduler (PR #170 / v0.31.0). RootHandle.awaitCommit and RootHandle.commitGeneration are app-scoped: one Loom serves all roots of a WeftApp, so with multiple roots awaitCommit may wait on sibling roots' in-flight work. This is documented as a deliberate superset (may over-wait), not a bug (LM11, loom.specs.md:129).
Proposal
Add per-root filtering so RootHandle.awaitCommit resolves once everything dirty for that root at call time has committed or been discarded, independent of sibling roots:
- Tag each registered cell with its owning root (cells already carry a
scope; a root id can be threaded through LoomRegisterOptions or derived from the render context).
awaitCommit barriers filter on the root tag; commitGeneration optionally exposes a per-root generation alongside the app-scoped one.
Constraints
- Single-root apps (the common case) behave identically.
- The app-scoped
commitGeneration stays available (some callers want global quiescence).
- No change to the flush loop's single-fiber, ascending-
seq commit ordering.
References
- LM11 (RootHandle surface, app-scoped superset) —
packages/dom/src/client/loom.specs.md:129
awaitCommit quiescence scope note — loom.specs.md:304
- Listed as out-of-scope follow-up in
loom.specs.md (line 32).
Summary
Follow-up to the Loom render scheduler (PR #170 / v0.31.0).
RootHandle.awaitCommitandRootHandle.commitGenerationare app-scoped: one Loom serves all roots of aWeftApp, so with multiple rootsawaitCommitmay wait on sibling roots' in-flight work. This is documented as a deliberate superset (may over-wait), not a bug (LM11,loom.specs.md:129).Proposal
Add per-root filtering so
RootHandle.awaitCommitresolves once everything dirty for that root at call time has committed or been discarded, independent of sibling roots:scope; a root id can be threaded throughLoomRegisterOptionsor derived from the render context).awaitCommitbarriers filter on the root tag;commitGenerationoptionally exposes a per-root generation alongside the app-scoped one.Constraints
commitGenerationstays available (some callers want global quiescence).seqcommit ordering.References
packages/dom/src/client/loom.specs.md:129awaitCommitquiescence scope note —loom.specs.md:304loom.specs.md(line 32).