[Observation] Refactor for state machine (and behavior robustness) and adjust protocol requirement names #64414
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adjusts the implementation for the registrar to now have a robust state machine to transition from discrete states for deterministic results (particularly for testing). The primitive requirements for the
Observable
protocol are now namedchanges
andvalues
to reflect their more common parlance usage/meaning (and also more accurately reflect other APIs). Thevalues
protocol requirement now emits values such that if a property changes in-between suspension it can now determine that the value has changed and emit that (whereas previously the value may have been dropped).The module name was also corrected to have a leading underscore since that module has not yet been accepted as a proposal - after acceptance it will be renamed back to dropping the leading underscore (demarcating that it is part of the official builds and is no longer experimental).