Improved concurrency primitives for Ember.js. Documentation can be found here.
ember-concurrency
is an ember-cli addon. You can install it via:
ember install ember-concurrency
Ember Concurrency requires the use of a Babel Transform to convert tasks in the "async-arrow" notation (e.g. fooTask = task(async () => { /*...*/ }
) into generator functions. Since Ember Concurrency 4.0.0+ is an Embroider V2 Addon, this Babel transform needs to be configured on the consuming application or addon.
// in app ember-cli-build.js
const app = new EmberApp(defaults, {
// ...
babel: {
plugins: [
// ... any other plugins
require.resolve("ember-concurrency/async-arrow-task-transform"),
// NOTE: put any code coverage plugins last, after the transform.
],
}
});
// in V1 addon index.js
// ...
options: {
babel: {
plugins: [
require.resolve('ember-concurrency/async-arrow-task-transform'),
],
},
},
See the test application for an example.
The ember-concurrency documentation site is an ember-cli app with interactive examples powered by ember-concurrency. It runs from ember-concurrency's test app.
- Open an Issue.
- Try to replicate the issue within an ember-twiddle
- Ask a question in the
#e-concurrency
channel at the Ember Community Discord server
See the Contributing guide for details.