Skip to content

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

Merged
rwjblue merged 2 commits intoemberjs:masterfrom
rwjblue:bring-back-sync
Jan 18, 2018
Merged

Bring back sync queue with deprecation (until: 3.5.0).#16132
rwjblue merged 2 commits intoemberjs:masterfrom
rwjblue:bring-back-sync

Conversation

@rwjblue
Copy link
Copy Markdown
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
Copy Markdown

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