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

Bring back sync queue with deprecation (until: 3.5.0). #16132

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jan 16, 2018

Removing the sync queue was done in #16097 and #16110. Unfortunately, addon authors have reported this as a regression in the 3.0.0 beta cycle (due to it not having been previously deprecated).

This reverts the removal, and adds a private API deprecation scheduled for removal in 3.5.0.

@rwjblue rwjblue merged commit 16879e0 into emberjs:master Jan 18, 2018
@rwjblue rwjblue deleted the bring-back-sync branch January 18, 2018 15:02
@vothaison
Copy link

Hi @rwjblue

I don't see Ember.run.sync() in (and since) v3.0.0; Where have it gone?

By the way, we have this code:

change: function (event) {
        this.set('data', 'SOME VALUE');
        Ember.run.sync();
        this.sendAction('on-change', event, this.item);
    },

The purpose is to sendAction after run.sync, to make sure that any properties depending on this 'data' have settled before we fire the change action (which may rely on 'data').

Can we change it to

change: function (event) {
        this.set('data', this.parse(this.get('value')));
        Ember.run.next(this, function () {
            this.sendAction('on-change', event, this.item);
        });
    },

Everything is still "synced" before sendAction, right?

Thanks.

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

Successfully merging this pull request may close these issues.

2 participants