-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[Observation] Proposal to add a transactional observation of values #2726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes a few grammar typos
proposals/NNNN-observed.md
Outdated
`AsyncSequence` of values emitted from changes to a property on a given model | ||
type. For example, DockKit provides `trackingStates` and Group Activities | ||
provides `localParticipantStates`. These are much like other APIs that provide | ||
`AsyncSequence` from a model type; they hand crafted to provide events from when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`AsyncSequence` from a model type; they hand crafted to provide events from when | |
`AsyncSequence` from a model type; they are hand crafted to provide events from when |
proposals/NNNN-observed.md
Outdated
prime for the next call to the iterator's `next` method. | ||
|
||
The closure has two other features that are important for common usage; firstly | ||
the closure is typed-throws such that any access to that emission closure will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the closure is typed-throws such that any access to that emission closure will | |
the closure uses typed-throws such that any access to that emission closure will |
…aviors and potential edge cases
@Jumhyn I added a new section for |
proposals/NNNN-observed.md
Outdated
|
||
Numerous frameworks in the Darwin SDKs provide APIs for accessing an | ||
`AsyncSequence` of values emitted from changes to a property on a given model | ||
type. For example, DockKit provides `trackingStates` and Group Activities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given that (AFAICT) the cited examples are closed source, it's not self-evident that they have semantics compatible with what's being proposed here. are you asserting that they do – i.e. these API could be re-implemented with the proposed Observed
type? are there open source examples that could be used here instead?
…version for explicitly constructing Observed untilFinished
This proposal contains a modification to the Observation module that adds a new type. This type is an
AsyncSequence
that produces values over time by tracking transactional changes to@Observable
marked types.