Next: Installation

ember-concurrency is an Ember Addon that makes it easy to write concise, robust, and beautiful asynchronous code.

It provides you with a powerful Task primitive, which offers the following benefits:

  • Tasks, unlike Promises, support cancelation.
  • Tasks expose their underlying state (whether they're running or idle) which makes it trivial to build loading indicators without having to manually track / mutate state yourself.
  • Task Modifiers make it trivial to prevent two executions of the same task from running at the same time, e.g. you can prevent double form submissions using the .drop() modifier, or you can configure a task to be .restartable() so that it starts over when you click a "Restart" button. Implementing this logic without tasks requires a lot of boilerplate code and defensive programming.
  • Tasks that live on Components are automatically canceled when that Component is unrendered; no more if(this.isDestroyed) checks to prevent timers or ajax responses causing "set on destroyed object" errors.
  • ...and much more

Additional Learning Resources

In addition to the comprehesive documentation on this site, you might find the following links useful for learning about ember-concurrency.

Next: Installation