Skip to content

Commit

Permalink
Merge pull request #16097 from rwjblue/remove-sync
Browse files Browse the repository at this point in the history
[CLEANUP beta] Remove `sync` runloop queue.
  • Loading branch information
rwjblue authored Jan 10, 2018
2 parents 629c5a8 + 8627dfa commit fde777c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 55 deletions.
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: {
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.

0 comments on commit fde777c

Please sign in to comment.