Skip to content
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

observables notify a "spectate" event whenever their value changes. #2171

Merged
merged 2 commits into from Dec 14, 2016

Conversation

mbest
Copy link
Member

@mbest mbest commented Dec 10, 2016

This is like the "change" event but is not delayed by rateLimit/deferred and will notify when a sleeping pure computed observable gets a new value (by being accessed). Subscribing to "spectate" will not awaken a sleeping pure computed either.

See #1735 and #1511

…his is like the "change" event but is not delayed by rateLimit/deferred and will notify when a sleeping pure computed observable gets a new value (by being accessed). Subscribing to "spectate" will not awaken a sleeping pure computed either.
@mbest
Copy link
Member Author

mbest commented Dec 11, 2016

spectate occurs before change. For a rate-limited or deferred computed, the spectate event doesn't cause the computed value to be calculated early. Instead it will be fired right before the delayed change event, or if the computed is accessed earlier, it will be fired then.

Copy link
Member

@brianmhunt brianmhunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me (though I haven't run the unit tests.) Thanks, @mbest .

@mbest mbest merged commit 87e8a59 into master Dec 14, 2016
@brianmhunt
Copy link
Member

@mbest - Glad you added 4e55d4b – makes the changes to updateVersion easier to understand.

@mbest mbest deleted the 1735-spectate-event branch April 8, 2017 03:39
mbest added a commit that referenced this pull request Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants