Skip to content

Commit

Permalink
Remove deprecated 'RUN_SYNC'
Browse files Browse the repository at this point in the history
  • Loading branch information
btecu committed Oct 18, 2018
1 parent 3ea40fb commit 9b7e0f5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 71 deletions.
1 change: 0 additions & 1 deletion packages/@ember/deprecated-features/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const SEND_ACTION = !!'3.4.0';
export const EMBER_EXTEND_PROTOTYPES = !!'3.2.0-beta.5';
export const RUN_SYNC = !!'3.0.0-beta.4';
export const LOGGER = !!'3.2.0-beta.1';
export const POSITIONAL_PARAM_CONFLICT = !!'3.1.0-beta.1';
export const PROPERTY_WILL_CHANGE = !!'3.1.0-beta.1';
Expand Down
26 changes: 3 additions & 23 deletions packages/@ember/runloop/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { assert, deprecate } from '@ember/debug';
import { assert } from '@ember/debug';
import { onErrorTarget } from '@ember/-internals/error-handling';
import { beginPropertyChanges, endPropertyChanges } from '@ember/-internals/metal';
import Backburner from 'backburner';
import { RUN_SYNC } from '@ember/deprecated-features';

let currentRunLoop = null;
export function getCurrentRunLoop() {
Expand Down Expand Up @@ -54,15 +52,6 @@ let backburnerOptions = {
onErrorMethod: 'onerror',
};

if (RUN_SYNC) {
queues.unshift('sync');

backburnerOptions.sync = {
before: beginPropertyChanges,
after: endPropertyChanges,
};
}

export const backburner = new Backburner(queues, backburnerOptions);

/**
Expand Down Expand Up @@ -324,12 +313,7 @@ export function end() {
@return {*} Timer information for use in canceling, see `cancel`.
@public
*/
export function schedule(queue /*, target, method */) {
deprecate(`Scheduling into the '${queue}' run loop queue is deprecated.`, queue !== 'sync', {
id: 'ember-metal.run.sync',
until: '3.5.0',
});

export function schedule(/*queue, target, method */) {
return backburner.schedule(...arguments);
}

Expand Down Expand Up @@ -469,11 +453,7 @@ export function once(...args) {
@return {Object} Timer information for use in canceling, see `cancel`.
@public
*/
export function scheduleOnce(queue /*, target, method*/) {
deprecate(`Scheduling into the '${queue}' run loop queue is deprecated.`, queue !== 'sync', {
id: 'ember-metal.run.sync',
until: '3.5.0',
});
export function scheduleOnce(/*queue, target, method*/) {
return backburner.scheduleOnce(...arguments);
}

Expand Down
16 changes: 1 addition & 15 deletions packages/@ember/runloop/tests/schedule_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ moduleFor(
let runLoop = getCurrentRunLoop();
assert.ok(runLoop, 'run loop present');

expectDeprecation(() => {
schedule('sync', () => {
order.push('sync');
assert.equal(runLoop, getCurrentRunLoop(), 'same run loop used');
});
}, `Scheduling into the 'sync' run loop queue is deprecated.`);

schedule('actions', () => {
order.push('actions');
assert.equal(runLoop, getCurrentRunLoop(), 'same run loop used');
Expand All @@ -65,13 +58,6 @@ moduleFor(
order.push('actions');
assert.equal(runLoop, getCurrentRunLoop(), 'same run loop used');
});

expectDeprecation(() => {
schedule('sync', () => {
order.push('sync');
assert.equal(runLoop, getCurrentRunLoop(), 'same run loop used');
});
}, `Scheduling into the 'sync' run loop queue is deprecated.`);
});

schedule('destroy', () => {
Expand All @@ -80,7 +66,7 @@ moduleFor(
});
});

assert.deepEqual(order, ['sync', 'actions', 'sync', 'actions', 'destroy']);
assert.deepEqual(order, ['actions', 'actions', 'destroy']);
}
}
);
32 changes: 0 additions & 32 deletions packages/@ember/runloop/tests/sync_test.js

This file was deleted.

0 comments on commit 9b7e0f5

Please sign in to comment.