Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.22 KB

API.md

File metadata and controls

48 lines (35 loc) · 1.22 KB

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 { task, timeout } from 'ember-concurrency';

export default Component.extend({
  loopingTask: task(function * () {
    while (true) {
      this.set('num', Math.random());
      yield timeout(100);
    }
  }).on('init')
});

Task Modifiers

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

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 cna hence be used in conjunction with Tasks / TaskInstances.

Misc