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

Remove old workaround for reentrant Property notifications #1624

Open
zepumph opened this issue Mar 28, 2024 · 0 comments
Open

Remove old workaround for reentrant Property notifications #1624

zepumph opened this issue Mar 28, 2024 · 0 comments
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Mar 28, 2024

From phetsims/axon#447, we now reentrantly notify Property changes as a "queue" (instead of a stack). This eliminates the need for many workarounds where we store the "old value" for later because we can't trust the oldValue provided by the property listener callback. We should get rid of these. @jonathanolson will take the lead.

For example:

// As a workaround for Property deferment issues, we'll keep track of the last Color that we added a listener to, so
// that we can clean up things Property EVEN when we don't get correct Property change notifications.
private lastColor!: Color | null;

zepumph added a commit that referenced this issue Mar 28, 2024
Signed-off-by: Michael Kauzmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants