Home

ember-concurrency API docs

All of ember-concurrency's public API is available on the "ember-concurrency" module, and most of the time, you'll only be using the task and timeout imports, e.g.:

import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { task, timeout } from 'ember-concurrency';

export default class MyCompontent extends Component {
  @tracked num;

  constructor() {
    super(...arguments);
    this.loopingTask.perform();
  }

  @task *loopingTask() {
    while (true) {
      this.num = Math.random();
      yield timeout(100);
    }
  }
});

Task Decorators

You can find a description of all the Task Decorators under the global API docs.

Task Modifiers

You can find a description of all the Task Modifiers under the Task Property API docs.

Task Modifier API

These functions provide the ability to register and lookup registered user-defined Task Modifiers.

Task/cancelation-aware variants of Promise helpers

These helpers are just like their Promise/RSVP equivalents, but with the added behavior that they support cancelation and can hence be used in conjunction with Tasks / TaskInstances.

Misc