Skip to content

Commit

Permalink
Remove sync queue from @ember/runloop.
Browse files Browse the repository at this point in the history
Was deprecated `until: '3.5.0'`, should be safe to cleanup now.
  • Loading branch information
rwjblue committed Apr 17, 2019
1 parent 6f3ea5a commit 93f211e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
1 change: 0 additions & 1 deletion packages/@ember/deprecated-features/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

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 MERGE = !!'3.6.0-beta.1';
export const ROUTER_EVENTS = !!'4.0.0';
Expand Down
30 changes: 4 additions & 26 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 { 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 @@ -46,24 +44,13 @@ export const queues = [
_rsvpErrorQueue,
];

let backburnerOptions = {
export const backburner = new Backburner(queues, {
defaultQueue: 'actions',
onBegin,
onEnd,
onErrorTarget,
onErrorMethod: 'onerror',
};

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

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

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

/**
@module @ember/runloop
Expand Down Expand Up @@ -324,12 +311,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 +451,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

0 comments on commit 93f211e

Please sign in to comment.