| Module: | @ember/runloop |
|---|
Defined in packages/@ember/runloop/index.ts:150
import { join } from '@ember/runloop'; 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.
});
});
© 2022 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/4.9/functions/@ember%2Frunloop/join