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 mentions of run.sync #16110

Merged
merged 1 commit into from
Jan 11, 2018
Merged
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
37 changes: 3 additions & 34 deletions packages/ember-metal/lib/run_loop.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ run.end = function() {

@property queues
@type Array
@default ['sync', 'actions', 'destroy']
@default ['actions', 'destroy']
@private
*/

Expand All @@ -246,11 +246,6 @@ run.end = function() {
```javascript
import { schedule } from '@ember/runloop';

schedule('sync', this, function() {
// this will be executed in the first RunLoop queue, when bindings are synced
console.log('scheduled on sync queue');
});

schedule('actions', this, function() {
// this will be executed in the 'actions' queue, after bindings have synced.
console.log('scheduled on actions queue');
Expand All @@ -265,8 +260,7 @@ run.end = function() {
@method schedule
@static
@for @ember/runloop
@param {String} queue The name of the queue to schedule against.
Default queues are 'sync' and 'actions'
@param {String} queue The name of the queue to schedule against. Default queues is 'actions'
@param {Object} [target] target object to use as the context when invoking a method.
@param {String|Function} method The method to invoke. If you pass a string it
will be resolved on the target object at the time the scheduled item is
Expand Down Expand Up @@ -295,31 +289,6 @@ run.cancelTimers = function() {
backburner.cancelTimers();
};

/**
Immediately flushes any events scheduled in the 'sync' queue. Bindings
use this queue so this method is a useful way to immediately force all
bindings in the application to sync.

You should call this method anytime you need any changed state to propagate
throughout the app immediately without repainting the UI (which happens
in the later 'render' queue added by the `ember-views` package).

```javascript
run.sync();
```

@method sync
@static
@for @ember/runloop
@return {void}
@private
*/
run.sync = function() {
if (backburner.currentInstance) {
backburner.currentInstance.queues.sync.flush();
}
};

/**
Invokes the passed target/method and optional arguments after a specified
period of time. The last parameter of this method must always be a number
Expand Down Expand Up @@ -442,7 +411,7 @@ run.once = function(...args) {
@method scheduleOnce
@static
@for @ember/runloop
@param {String} [queue] The name of the queue to schedule against. Default queues are 'sync' and 'actions'.
@param {String} [queue] The name of the queue to schedule against. Default queues is 'actions'.
@param {Object} [target] The target of the method to invoke.
@param {Function|String} method The method to invoke.
If you pass a string it will be resolved on the
Expand Down