Function
join (target, method, args*) Object public
Module: | @ember/runloop |
---|
Defined in packages/@ember/runloop/index.js:109
import { join } from '@ember/runloop';
- target
- Object
- target of method to call
- method
- Function|String
- Method to invoke. May be a function or a string. If you pass a string then it will be looked up on the passed target.
- args*
- Object
- Any additional arguments you wish to pass to the method.
- returns
- Object
- Return value from invoking the passed function. Please note, when called within an existing loop, no return value is possible.
If no run-loop is present, it creates a new one. If a run loop is present it will queue itself to run on the existing run-loops action queue.
Please note: This is not for normal usage, and should be used sparingly.
If invoked when not within a run loop:
import { join } from '@ember/runloop'; join(function() { // creates a new run-loop });
Alternatively, if called within an existing run loop:
import { run, join } from '@ember/runloop'; run(function() { // creates a new run-loop join(function() { // joins with the existing run-loop, and queues for invocation on // the existing run-loops action queue. }); });
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/3.25/functions/@ember%2Frunloop/join