Commit Graph
4 Commits
Author SHA1 Message Date
aiongg dd0666065e ui-contract: pass-local service state
The services the pipeline touches on every run live in one PassState with a
RefCell field each. The begin hook of a context's outermost pass on a thread
moves it out of context data into the thread; the end hook moves it back.
Inside a pass a service access is a borrow of a plain field: no TypeId map
probe, no Arc handle, no mutex. Access outside a pass holds the state for
that one call.

PerViewport types say where their records live through the Stored trait:
a context service by default, a PassState field for the pass-local ones.

The thread-local handle map (HANDLES, ContextToken, open_handles) goes;
Service::run is a context-data lookup for the services that stay there.
A testing counter of those lookups backs a trial: a settled pass of forty
leaves makes as many lookups as one of ten.
2026-11-12 14:32:39 +00:00
aiongg 65f67985fc Count trial: a settled memory stage records no slot again 2026-11-12 14:32:39 +00:00
aiongg 5835939df3 Memory write-back records only what the registry lacks 2026-11-12 14:32:39 +00:00
aiongg e4d2fc38fb Runtime and contract: craft-ui-contract, macros and the test kit 2026-11-12 14:09:32 +00:00