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

[CLEANUP beta] Remove sync runloop queue. #16097

Merged
merged 1 commit into from
Jan 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions packages/ember-metal/lib/run_loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import { assert, isTesting } from 'ember-debug';
import {
onErrorTarget
} from './error_handler';
import {
beginPropertyChanges,
endPropertyChanges
} from './property_events';
import Backburner from 'backburner';

function onBegin(current) {
Expand All @@ -16,11 +12,7 @@ function onEnd(current, next) {
run.currentRunLoop = next;
}

const backburner = new Backburner(['sync', 'actions', 'destroy'], {
sync: {
Copy link
Contributor

Choose a reason for hiding this comment

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

this functionality in backburner was only for the sync queue

Copy link
Member

Choose a reason for hiding this comment

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

ya, we can remove it from BB and then cut a major

Copy link
Member Author

Choose a reason for hiding this comment

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

Ya, we will have to wait for a short while (because the legacy addon still needs to enable this functionality through Ember 3.4), but totally agree that it will be awesome to get rid of 😆

before: beginPropertyChanges,
after: endPropertyChanges
},
const backburner = new Backburner(['actions', 'destroy'], {
defaultQueue: 'actions',
onBegin,
onEnd,
Expand Down
12 changes: 1 addition & 11 deletions packages/ember-metal/tests/run_loop/schedule_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ moduleFor('system/run_loop/schedule_test', class extends AbstractTestCase {
let runLoop = run.currentRunLoop;
assert.ok(runLoop, 'run loop present');

run.schedule('sync', () => {
order.push('sync');
assert.equal(runLoop, run.currentRunLoop, 'same run loop used');
});

run.schedule('actions', () => {
order.push('actions');
assert.equal(runLoop, run.currentRunLoop, 'same run loop used');
Expand All @@ -61,11 +56,6 @@ moduleFor('system/run_loop/schedule_test', class extends AbstractTestCase {
order.push('actions');
assert.equal(runLoop, run.currentRunLoop, 'same run loop used');
});

run.schedule('sync', () => {
order.push('sync');
assert.equal(runLoop, run.currentRunLoop, 'same run loop used');
});
});

run.schedule('destroy', () => {
Expand All @@ -74,7 +64,7 @@ moduleFor('system/run_loop/schedule_test', class extends AbstractTestCase {
});
});

assert.deepEqual(order, ['sync', 'actions', 'sync', 'actions', 'destroy']);
assert.deepEqual(order, ['actions', 'actions', 'destroy']);
}

['@test makes sure it does not trigger an autorun during testing']() {
Expand Down
35 changes: 0 additions & 35 deletions packages/ember-metal/tests/run_loop/sync_test.js

This file was deleted.