ember-concurrency

Manage structured async tasks with lifecycle-aware cancellation in Ember applications.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/trusted-american/marketplace --skill ember-concurrency
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ember-concurrency
Source: https://github.com/trusted-american/marketplace/tree/main/plugins/a3-plugin/skills/ember-concurrency
Command: npx skills add https://github.com/trusted-american/marketplace --skill ember-concurrency

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ember apps often struggle with uncoordinated async operations that can cause memory leaks or errors when components unmount mid-flight. ember-concurrency provides structured async primitives to manage tasks with lifecycle awareness (cancellation, cleanup) and to prevent set-on-destroyed-object errors.

Core Features & Use Cases

  • Task definitions via task() for structured async logic
  • Modifiers: .drop(), .restartable(), .enqueue(), .keepLatest(), and TaskGroups for coordinating multiple tasks
  • Utilities: timeout, waitForEvent, didCancel, and cancellation semantics to build robust flows
  • Use cases include form saves, data loading, background processing, searches, and polling with deterministic behavior

Quick Start

Create a task with task(async () => { ... }) and invoke it with perform(), using an appropriate modifier to control concurrency.

Frequently Asked Questions about ember-concurrency

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent set-on-destroyed-object errors during async operations in Ember?

Prevent set-on-destroyed-object errors by defining async logic as structured tasks using ember-concurrency. Tasks provide lifecycle awareness and automatic cancellation, ensuring operations halt cleanly when components unmount and preventing memory leaks.

How do I cancel async tasks when an Ember component unmounts?

Cancel async tasks during component unmounting by leveraging ember-concurrency's built-in cancellation semantics and TaskInstance API. Tasks are automatically canceled when their host component is destroyed, halting background processing and preventing memory leaks safely.

How do I coordinate multiple async operations running at the same time in Ember?

Coordinate multiple async operations using TaskGroups and shared concurrency modifiers like drop, restartable, enqueue, and keepLatest. These tools manage task execution order and prevent overlapping operations for deterministic background processing.

What is the best way to handle form saves and data loading without race conditions in Ember?

Handle form saves and data loading without race conditions by applying ember-concurrency modifiers like restartable or drop to task definitions. This structures async operations to cancel outdated requests or queue new ones for deterministic behavior.

How do I build polling or search features with deterministic async behavior in Ember?

Build polling and search features with deterministic behavior by defining ember-concurrency tasks using utilities like timeout and waitForEvent. Apply modifiers such as restartable or enqueue to manage overlapping requests and ensure clean cancellation.

Can I track the running state of an async task in Ember templates?

Track the running state of async tasks in Ember templates using derived task state properties like isRunning and lastSuccessful. These properties automatically update based on TaskInstance lifecycle, enabling reactive UI updates without manual state management.